Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more than one order marker per test #45

Closed
mrbean-bremen opened this issue Jun 1, 2021 · 1 comment · Fixed by #46
Closed

Allow more than one order marker per test #45

mrbean-bremen opened this issue Jun 1, 2021 · 1 comment · Fixed by #46
Labels
bug Something isn't working

Comments

@mrbean-bremen
Copy link
Member

Currently, only one order marker per test is allowed. This does not matter if the markers are directly on the test, as the attributes can always be written i the same marker, but it does if there are both class and test markers shall be used, e.g.:

@pytest.mark.order(after="TestClass2")
class TestClass1:
    @pytest.mark.order(2)
    def test_1():
        pass

    @pytest.mark.order(1)
    def test_2():
        pass

will currently not work, because the class marker will be ignored if a local test marker is present.

@mrbean-bremen mrbean-bremen added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jun 1, 2021
@mrbean-bremen
Copy link
Member Author

This is actually a bug - the documentation notes that class markers work, so they also have to work with test markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant