diff --git a/testing_support/auto_stub.py b/testing_support/auto_stub.py index c5a3495c6f..b266692e97 100644 --- a/testing_support/auto_stub.py +++ b/testing_support/auto_stub.py @@ -70,4 +70,7 @@ class TestCase(unittest.TestCase, AutoStubMixIn): def has_failed(self): """Returns True if the test has failed.""" + if not self._resultForDoCleanups: + # Maybe skipped. + return False return not self._resultForDoCleanups.wasSuccessful()