-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
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
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
Metadata
Metadata
Assignees
Labels
No labels