New submission from Dieter Maurer <die...@handshake.de>:

Currently, "TestCase.run" supports several features to control testing - among 
others, a test can be skipped via the attribute "__unittest_skip__". 
"TestCase.debug" ignores all those controls and calls the test method 
unconditionally.

I am using "zope.testrunner" to run test suites. Its "-D" option switches from 
"TestCase.run" to "TestCase.debug" in order to allow the analysis of the state 
of a failing test in the Python debugger. "-D" is typically used if a test in a 
larger suite failed and a detailed analysis is required to determine the 
failure's cause. It is important that this second run executes the same tests 
as the first run; it is not helpful when the second run fails in a test skipped 
in the first run. Therefore, "TestCase.debug" should honour all test controls 
supported by  "TestCase.run".

One could argue that the testsuite runner should implement this logic. However, 
this would force the runner to duplicate the test control logic using internal 
implementation details of "unittest". Conceptually, it is much nicer to have 
the test control encapsulated by "unittest".

----------
components: Library (Lib)
messages: 340569
nosy: dmaurer
priority: normal
severity: normal
status: open
title: "unittest.TestCase.debug" should honour "skip" (and other test controls)
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36674>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to