@@ -103,7 +103,7 @@ def test_strict_option_is_deprecated(pytester: Pytester) -> None:
103103 def test_foo(): pass
104104 """
105105 )
106- result = pytester .runpytest ("--strict" )
106+ result = pytester .runpytest ("--strict" , "-Wdefault::pytest.PytestRemovedIn8Warning" )
107107 result .stdout .fnmatch_lines (
108108 [
109109 "'unknown' not found in `markers` configuration option" ,
@@ -189,7 +189,7 @@ def test_skipping_msg():
189189 pytest.skip(msg="skippedmsg")
190190 """
191191 )
192- result = pytester .runpytest (p )
192+ result = pytester .runpytest (p , "-Wdefault::pytest.PytestRemovedIn8Warning" )
193193 result .stdout .fnmatch_lines (
194194 [
195195 "*PytestRemovedIn8Warning: pytest.skip(msg=...) is now deprecated, "
@@ -208,7 +208,7 @@ def test_failing_msg():
208208 pytest.fail(msg="failedmsg")
209209 """
210210 )
211- result = pytester .runpytest (p )
211+ result = pytester .runpytest (p , "-Wdefault::pytest.PytestRemovedIn8Warning" )
212212 result .stdout .fnmatch_lines (
213213 [
214214 "*PytestRemovedIn8Warning: pytest.fail(msg=...) is now deprecated, "
@@ -227,7 +227,7 @@ def test_exit_msg():
227227 pytest.exit(msg="exitmsg")
228228 """
229229 )
230- result = pytester .runpytest (p )
230+ result = pytester .runpytest (p , "-Wdefault::pytest.PytestRemovedIn8Warning" )
231231 result .stdout .fnmatch_lines (
232232 [
233233 "*PytestRemovedIn8Warning: pytest.exit(msg=...) is now deprecated, "
@@ -245,7 +245,7 @@ def pytest_cmdline_preparse(config, args):
245245
246246 """
247247 )
248- result = pytester .runpytest ()
248+ result = pytester .runpytest ("-Wdefault::pytest.PytestRemovedIn8Warning" )
249249 result .stdout .fnmatch_lines (
250250 [
251251 "*PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated*" ,
@@ -299,7 +299,7 @@ def test_omits_warnings():
299299 ...
300300 """
301301 )
302- output = pytester .runpytest ()
302+ output = pytester .runpytest ("-Wdefault::pytest.PytestRemovedIn8Warning" )
303303 message = [
304304 "*PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release." ,
305305 "*test_nose_deprecated_with_setup.py::test_omits_warnings is using nose method: `setup_fn_no_op` (setup)" ,
@@ -327,7 +327,7 @@ def test(self):
327327 ...
328328 """
329329 )
330- output = pytester .runpytest ()
330+ output = pytester .runpytest ("-Wdefault::pytest.PytestRemovedIn8Warning" )
331331 message = [
332332 "*PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release." ,
333333 "*test_nose_deprecated_setup_teardown.py::Test::test is using nose-specific method: `setup(self)`" ,
0 commit comments