mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) (GH-28065)
Previously it returned None if the test class or method was
decorated with a skipping decorator.
Co-authored-by: Iman Tabrizian <iman.tabrizian@gmail.com>
(cherry picked from commit 7e246a3a7b
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
576803d7a8
commit
0c5e0aa73f
3 changed files with 34 additions and 24 deletions
|
@ -574,7 +574,7 @@ class TestCase(object):
|
|||
skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
|
||||
or getattr(testMethod, '__unittest_skip_why__', ''))
|
||||
self._addSkip(result, self, skip_why)
|
||||
return
|
||||
return result
|
||||
|
||||
expecting_failure = (
|
||||
getattr(self, "__unittest_expecting_failure__", False) or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue