Open
Description
Hi,
In my use case I need to skip all tests in some python package. For this purpose I added pytestmark
to __init__.py
:
# __init__.py
import pytest
pytestmark = pytest.mark.skip
I expect all tests to be skipped in this package. However, the first test in this package runs.
Here is a failed test for this issue:
def test_skip_package(testdir):
testdir.makepyfile(
__init__="""
import pytest
pytestmark = pytest.mark.skip
"""
)
testdir.makepyfile(
"""
import pytest
def test_skip1():
assert 0
def test_skip2():
assert 0
"""
)
result = testdir.inline_run()
_, skipped, _ = result.listoutcomes()
assert len(skipped) == 2