Skip to content

Add distinct option to show full (assertion) diffs always #3962

@blueyed

Description

@blueyed

Currently you have to use -vv to show the whole diff for dicts, and not to truncate in general.

Code:

  1. 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

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions