deprecate the pytest.collect module

changelog

minimal unittest for collect module deprecations

\!fixup - changelog typo
This commit is contained in:
Ronny Pfannschmidt
2020-03-29 20:30:16 +02:00
parent ce429381a7
commit f1d51ba1f5
6 changed files with 54 additions and 30 deletions

View File

@@ -25,6 +25,13 @@ def test_resultlog_is_deprecated(testdir):
)
@pytest.mark.parametrize("attribute", pytest.collect.__all__) # type: ignore
# false positive due to dynamic attribute
def test_pytest_collect_module_deprecated(attribute):
with pytest.warns(DeprecationWarning, match=attribute):
getattr(pytest.collect, attribute)
def test_terminal_reporter_writer_attr(pytestconfig):
"""Check that TerminalReporter._tw is also available as 'writer' (#2984)
This attribute has been deprecated in 5.4.