You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/ethanfurman'closed_at=<Date2022-03-29.15:03:07.473>created_at=<Date2012-03-12.19:59:47.348>labels= ['easy', 'library', '3.11']
title='Fully qualified test name in failure output'updated_at=<Date2022-03-29.15:03:07.473>user='https://github.com/voidspace'
I'm pretty sure Michael is talking about unittest. Doing the same for regrtest would be interesting but not as important. (When I run individual tests from the Python test suite I generally use -m unittest to do it.)
Included is a patch with the suggested change.
I changed the TestCase.__str__ method to:
return "%s (%s.%s)" % (self._testMethodName, strclass(self.__class__), self._testMethodName)
return "%s (%s)" % (self._testMethodName, strclass(self.__class__))
Traceback (most recent call last):
File "/home/aviv/dev/cpython/Lib/test/test_logging.py", line 641, in test_error_handlingself.assertIs(h.error_record, r)
AttributeError: 'TestStreamHandler' object has no attribute 'error_record'
The provided patch wasn't entirely compatible with the current upstream code. I used the patch file to apply the changes to [Lib/unittest/case.py](https://github.com/python/cpython/blob/main/Lib/unittest/case.py), resolved the remaining conflicts with the patches to the test files and amended existing tests for the library.
I updated the documentation for unittest to reflect the changes in behaviour.