[issue41620] Python Unittest does not return results object when the test is skipped

Irit Katriel report at bugs.python.org
Tue Jan 12 13:10:46 EST 2021


Irit Katriel <iritkatriel at yahoo.com> added the comment:

The justification on the PR is: 

"The problem is that when I'm trying to collect test results if one of the tests is being skipped the error below pops up because test_result object is None.
AttributeError: 'NoneType' object has no attribute 'testsRun'"

which can be worked around with a simple "is not None" check. 

There will be cases where someone wants to know that a test was not executed, and inspecting a TestResult object to see that it actually represents Nothing is not as natural.

I'm -1 on this change.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41620>
_______________________________________


More information about the Python-bugs-list mailing list