This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: unittest: TestSuite.debug() does not like subTest()
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5
Status: closed Resolution: duplicate
Dependencies: Superseder: unittest subTests() fails when called from debug()
View: 34900
Assigned To: Nosy List: berker.peksag, ezio.melotti, michael.foord, pitrou, rbcollins, wrohdewald
Priority: normal Keywords:

Created on 2017-02-14 07:10 by wrohdewald, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit wrohdewald, 2017-02-14 07:10
Messages (2)
msg287738 - (view) Author: Wolfgang Rohdewald (wrohdewald) Date: 2017-02-14 07:10
the main code is appended in

if a test uses with self.subTest(), subTest() fails right in its first statement "if not self._outcome ..." because _outcome is None.

In, the commented would work correctly.

If this is not meant to work, please mention it in the documentation and  improve unittest's reaction.

what I would find more logical from the users's point of view is something like

msg327122 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-10-05 10:29
Thanks for the report, Wolfgang. The main cause of the issue will be resolved when we merge PR 9707. I'm closing this as a duplicate of issue 34900 since the latter has already an open PR.
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73737
2018-10-05 10:29:40berker.peksagsetstatus: open -> closed

superseder: unittest subTests() fails when called from debug()

nosy: + berker.peksag
messages: + msg327122
resolution: duplicate
stage: resolved
2017-02-14 07:54:00serhiy.storchakasetnosy: + pitrou, rbcollins, ezio.melotti, michael.foord

type: crash -> behavior
versions: + Python 3.6, Python 3.7
2017-02-14 07:10:49wrohdewaldcreate