-
-
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
pytest -v does not include "Differing Items" with long-enough dicts #1512
Comments
Hey @flub, this is caused because all output that has verbosity < 2 is truncated at 10 lines: pytest/_pytest/assertion/__init__.py Line 137 in 8639bf7
The Not sure the best approach here. Do you think it's more useful to just remove the common items output when verbosity=1? The differing items are probably more useful to the user. We could also change the truncation formatting to make it clearer that all output is truncated. |
sounds good to both :) |
Part one of pytest-dev#1512. If verbosity=1, assertion explanations are truncated at 10 lines. In this situation, it's more important to tell the user which dictionary items are different than which are the same.
Part two of pytest-dev#1512. Update the format of the truncation message to help make it clear that pytest truncates the entire assertion output when verbosity < 2.
Part one of pytest-dev#1512. If verbosity=1, assertion explanations are truncated at 10 lines. In this situation, it's more important to tell the user which dictionary items are different than which are the same.
Part two of pytest-dev#1512. Update the format of the truncation message to help make it clear that pytest truncates the entire assertion output when verbosity < 2.
This behaviour would be great. |
hey @merwok, this change has been merged into the features branch, so it should be included in the next minor release (3.1.0). |
Good news! ✨ |
Fixed by #1951 |
in the environment (I also get the error in pytest 2.8.7)
given ex.py:
Invoking py.test gives a very helpful error message:
However, running with -v breaks the diff (note the lack of "differing items" at the end):
-vv
does include everything (including that diff that is excluded), but it's very verbose when I have dozens of items in my dicts.This is not an issue when the dict is short -- maybe because we get the full diff instead of "Differing Items":
The text was updated successfully, but these errors were encountered: