From 82f584b5a9975ad758797203f52a38ba1fdecbad Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 1 May 2020 17:56:01 -0300 Subject: [PATCH] Fix test_trial_error in test_unittest This reverts the test to the state before 04f27d4, which introduced the breaking change about addCleanup not being called properly for failed tests. --- testing/test_unittest.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/testing/test_unittest.py b/testing/test_unittest.py index c72ed6f7d..83f1b6b2a 100644 --- a/testing/test_unittest.py +++ b/testing/test_unittest.py @@ -537,28 +537,24 @@ class TestTrialUnittest: ) result.stdout.fnmatch_lines( [ - "test_trial_error.py::TC::test_four SKIPPED", + "test_trial_error.py::TC::test_four FAILED", "test_trial_error.py::TC::test_four ERROR", "test_trial_error.py::TC::test_one FAILED", "test_trial_error.py::TC::test_three FAILED", - "test_trial_error.py::TC::test_two SKIPPED", - "test_trial_error.py::TC::test_two ERROR", + "test_trial_error.py::TC::test_two FAILED", "*ERRORS*", "*_ ERROR at teardown of TC.test_four _*", - "NOTE: Incompatible Exception Representation, displaying natively:", - "*DelayedCalls*", - "*_ ERROR at teardown of TC.test_two _*", - "NOTE: Incompatible Exception Representation, displaying natively:", "*DelayedCalls*", "*= FAILURES =*", - # "*_ TC.test_four _*", - # "*NameError*crash*", + "*_ TC.test_four _*", + "*NameError*crash*", "*_ TC.test_one _*", "*NameError*crash*", "*_ TC.test_three _*", - "NOTE: Incompatible Exception Representation, displaying natively:", "*DelayedCalls*", - "*= 2 failed, 2 skipped, 2 errors in *", + "*_ TC.test_two _*", + "*NameError*crash*", + "*= 4 failed, 1 error in *", ] )