-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully qualified test name in failure output #58473
Comments
Somewhere in the failure message for tests Guido would like to see the fully qualified test name, suitable for copying and pasting into a test runner invocation for running just that test. |
+10 :) |
Which failure message are we talking about? regrtest? unittest? |
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. So now a failed test look like this: ====================================================================== Traceback (most recent call last):
File "/home/aviv/dev/cpython/Lib/test/test_logging.py", line 641, in test_error_handling
self.assertIs(h.error_record, r)
AttributeError: 'TestStreamHandler' object has no attribute 'error_record' |
Hopefully somebody on the core-mentorship list can move this forward by converting to a PR and reviewing. If @palaviv is still active the review itself will still be useful. |
The provided patch wasn't entirely compatible with the current upstream code. I used the patch file to apply the changes to I updated the documentation for unittest to reflect the changes in behaviour. |
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
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: