bpo-34900: Make TestCase.debug() work with subtests (GH-9707)

This commit is contained in:
Bruno Oliveira 2018-10-12 07:35:55 -03:00 committed by Berker Peksag
parent 4505f65ae7
commit da2bf9f66d
3 changed files with 17 additions and 1 deletions

View file

@ -514,7 +514,7 @@ class TestCase(object):
case as failed but resumes execution at the end of the enclosed
block, allowing further test code to be executed.
"""
if not self._outcome.result_supports_subtests:
if self._outcome is None or not self._outcome.result_supports_subtests:
yield
return
parent = self._subtest