classification
Title: unittest: TestSuite.debug() does not like subTest()
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, michael.foord, pitrou, rbcollins, wrohdewald
Priority: normal Keywords:

Created on 2017-02-14 07:10 by wrohdewald, last changed 2017-02-14 07:54 by serhiy.storchaka.

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

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

In main.py, the commented runner.run(suite) 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

runner.debug(suite)
History
Date User Action Args
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