We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When pytest.mark.skipif applied to a class with bases (mixins) the tests from base clases are disabled for all other testcases.
pytest.mark.skipif
platform linux -- Python 3.4.3, pytest-2.9.0, py-1.4.30, pluggy-0.3.1
from unittest import TestCase import pytest class BaseMixin(): def test_foo(self): True @pytest.mark.skipif(True, reason="disabled") class TestBar(BaseMixin, TestCase): def test_bar(self): True class TestBaz(BaseMixin, TestCase): def test_baz(self): True
output:
collected 4 items tests.py::TestBar::test_bar SKIPPED tests.py::TestBar::test_foo SKIPPED tests.py::TestBaz::test_baz PASSED tests.py::TestBaz::test_foo SKIPPED =============================== 1 passed, 3 skipped in 0.04 seconds
The tests.py::TestBaz::test_foo was skipped because of mark at TestBar
tests.py::TestBaz::test_foo
TestBar
The text was updated successfully, but these errors were encountered:
Yep, it's a known issue... fixing it unfortunately is not so simple. 😬
See #631, #725, #568.
Sorry, something went wrong.
No branches or pull requests
When
pytest.mark.skipif
applied to a class with bases (mixins) the tests from base clases are disabled for all other testcases.platform linux -- Python 3.4.3, pytest-2.9.0, py-1.4.30, pluggy-0.3.1
output:
The
tests.py::TestBaz::test_foo
was skipped because of mark atTestBar
The text was updated successfully, but these errors were encountered: