-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
summary/OutcomeException: add support for short_msg #6003
Conversation
8aedb0b
to
2a06e76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
I left some minor suggestions which I belive are simple and worth doing. 👍
result = testdir.runpytest() | ||
result.stdout.no_fnmatch_line("*short test summary*") | ||
result = testdir.runpytest("-rf") | ||
result.stdout.fnmatch_lines( | ||
[ | ||
"*test summary*", | ||
"FAILED test_fail_extra_reporting.py::test_this - AssertionError: this_failedt...", | ||
"FAILED test_fail_extra_reporting.py::test_linematcher - remains unmatched: 'l...", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
2a06e76
to
8378608
Compare
Incorporated feedback. |
This is meant to improve the short msg with `-r`, where you want to see the non-matched line, and not the first line (that might have matched), from pytester's `_match_lines`. This will also come in handy for a better `__repr__`.
8378608
to
53568a5
Compare
Regressed in 000b906. Adds / handles `short_msg` to / in `ReprFileLocation`. Restores `test_pytest_fail` to before 53568a5, and hardens `test_fail_extra_reporting`. Ref: pytest-dev#6003
Regressed in 000b906. Adds / handles `short_msg` to / in `ReprFileLocation`. Restores `test_pytest_fail` to before 53568a5, and hardens `test_fail_extra_reporting`. Ref: pytest-dev#6003
Updated in blueyed#44. |
This is meant to improve the short msg with
-r
, where you want to seethe non-matched line, and not the first line (that might have matched),
from pytester's
_match_lines
.This also improves
__str__
/__repr__
.TODO:
pytest/src/_pytest/doctest.py
Lines 229 to 280 in 5e7b2ae
test_doctest_id
.