Currently you have to use -vv to show the whole diff for dicts, and not to truncate in general.
Code:
|
if same and verbose < 2: |
|
explanation += [u("Omitting %s identical items, use -vv to show") % len(same)] |
|
def _should_truncate_item(item): |
|
""" |
|
Whether or not this test item is eligible for truncation. |
|
""" |
|
verbose = item.config.option.verbose |
|
return verbose < 2 and not _running_on_ci() |
-
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 default
-
pytest.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.
Currently you have to use
-vvto 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
-vvthen, but would rather have it by default - without using very verbose mode by defaultpytest.assertion.truncatechecks 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.
-vvwould still have the same effect of course.