-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add distinct option to show full (assertion) diffs always #3962
Comments
A potential workaround that might work for some: Add to your conftest.py
|
TODO: - [ ] real plugin hook? - [ ] should handle other places where safeformat is used also, via args/options to the hook then likely. Ref: pytest-dev#3962 Ref: pytest-dev#5933
@pytest-dev/contributors |
btw/JFI: for skipping truncation (just one part of it), you can use pytest/src/_pytest/assertion/truncate.py Lines 23 to 34 in cbe3e3e
|
I guess they are being discussed in each PR? If not, please feel free to ping any stale PRs. |
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This makes test output much better, at the cost of a bunch of unwanted verbosity. See <pytest-dev/pytest#3962>.
This is closed by 56d9ea0 is it not? You can now just pop |
@bwoodsend that commit is not in pytest, but in a fork |
🤦 So it is... |
Closes pytest-dev#3962 Co-authored-by: Daniel Hahler <[email protected]>
Closes pytest-dev#3962 Co-authored-by: Daniel Hahler <[email protected]>
Closes pytest-dev#3962 Co-authored-by: Daniel Hahler <[email protected]>
Closes pytest-dev#3962 Co-authored-by: Daniel Hahler <[email protected]>
Done in #11473 |
Currently you have to use
-vv
to show the whole diff for dicts, and not to truncate in general.Code:
pytest/src/_pytest/assertion/util.py
Lines 295 to 296 in c00d934
pytest/src/_pytest/assertion/truncate.py
Lines 27 to 32 in c00d934
there should be a distinct option additionally, because I usually have to re-run the test with
-vv
then, but would rather have it by default - without using very verbose mode by defaultpytest.assertion.truncate
checks if it is running on CI and enables this then always. This should also be done for comparing dicts anyway. Should I file a separate issue / create a PR for this already?I would like to add this to the config file for projects where it makes sense, e.g. https://github.com/Vimjas/covimerage, where most of the tests are comparing program output (by lines), which usually gets truncated.
-vv
would still have the same effect of course.The text was updated successfully, but these errors were encountered: