Skip to content

Remove deprecated pytest mark on fixture for pytest 9.0 compatibility #686

Description

@Olibeyer

Issue

The @pytest.mark.skipif decorator on the zshrc fixture function in src/libtmux/pytest_plugin.py is deprecated and incompatible with pytest 9.0+.

According to pytest's deprecation notice (pytest 7.4 → removed in 9.0):

Applying a mark to a fixture function never had any effect, but it is a common user error. Users expected in this case that the mark would have its intended effect, when in fact it has no effect at all.
https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function

This will cause errors in pytest 9.0+.

Solution

Remove the @pytest.mark.skipif(USING_ZSH, reason="Using ZSH") decorator from the zshrc fixture. The fixture remains fully functional and unaffected by this change.

Note

I prepared this fix but I'm unable to open a PR directly due to repository access restrictions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions