Skip to content

Commit e269407

Browse files
committed
testing: avoid pytest_collect_directory message in warnings summary
Currently this test issues a warning which is displayed in the warning summary (of pytest's own test suite): testing/acceptance_test.py::TestGeneralUsage::test_early_skip /tmp/pytest-of-ran/pytest-396/test_early_skip0/conftest.py:2: PytestDeprecationWarning: The pytest_collect_directory hook is not working. Please use collect_ignore in conftests or pytest_collection_modifyitems. def pytest_collect_directory(): I think the filter was meant to be `ignore` in the first place, and not `always` which is not a valid action AFAIK.
1 parent 7d5f5a8 commit e269407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/acceptance_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def foo():
223223
"E {}: No module named 'qwerty'".format(exc_name),
224224
]
225225

226-
@pytest.mark.filterwarnings("always::pytest.PytestDeprecationWarning")
226+
@pytest.mark.filterwarnings("ignore::pytest.PytestDeprecationWarning")
227227
def test_early_skip(self, testdir):
228228
testdir.mkdir("xyz")
229229
testdir.makeconftest(

0 commit comments

Comments
 (0)