@@ -233,7 +233,7 @@ def tearDownClass(self):
233233def test_method_and_teardown_failing_reporting (testdir ):
234234 testdir .makepyfile (
235235 """
236- import unittest, pytest
236+ import unittest
237237 class TC(unittest.TestCase):
238238 def tearDown(self):
239239 assert 0, "down1"
@@ -530,19 +530,31 @@ def f(_):
530530 # will crash both at test time and at teardown
531531 """
532532 )
533- result = testdir .runpytest ()
533+ # Ignore DeprecationWarning (for `cmp`) from attrs through twisted,
534+ # for stable test results.
535+ result = testdir .runpytest (
536+ "-vv" , "-oconsole_output_style=classic" , "-W" , "ignore::DeprecationWarning"
537+ )
534538 result .stdout .fnmatch_lines (
535539 [
540+ "test_trial_error.py::TC::test_four FAILED" ,
541+ "test_trial_error.py::TC::test_four ERROR" ,
542+ "test_trial_error.py::TC::test_one FAILED" ,
543+ "test_trial_error.py::TC::test_three FAILED" ,
544+ "test_trial_error.py::TC::test_two FAILED" ,
536545 "*ERRORS*" ,
546+ "*_ ERROR at teardown of TC.test_four _*" ,
537547 "*DelayedCalls*" ,
538- "*test_four*" ,
548+ "*= FAILURES =*" ,
549+ "*_ TC.test_four _*" ,
539550 "*NameError*crash*" ,
540- "*test_one*" ,
551+ "*_ TC. test_one _ *" ,
541552 "*NameError*crash*" ,
542- "*test_three*" ,
553+ "*_ TC. test_three _ *" ,
543554 "*DelayedCalls*" ,
544- "*test_two*" ,
545- "*crash*" ,
555+ "*_ TC.test_two _*" ,
556+ "*NameError*crash*" ,
557+ "*= 4 failed, 1 error in *" ,
546558 ]
547559 )
548560
0 commit comments