pytest-regressions icon indicating copy to clipboard operation
pytest-regressions copied to clipboard

Show pytest-clarity diff if installed

Open CarliJoy opened this issue 2 years ago • 2 comments

It would be awesome if pytest-regression would show the clarity diff provided pytest-clarity if pytest-clarity is installed.

Maybe it only has to be changed in a way to use the default pytest pytest_assertrepr_compare for displaying the diff.

Anyway that would be awesome as in our CI runner we can't easily extract the HTML diff files from the temp dir, so the CI output is often the only thing we have for failing tests.

CarliJoy avatar Feb 07 '23 13:02 CarliJoy

Interesting idea, but it needs investigation if all we needed to do was to detect pytest-clarify + disable our custom diff generation in order to get pytest-clarify's nice diffs.

nicoddemus avatar Feb 07 '23 14:02 nicoddemus

Probably that all what's needed. An alternative is https://github.com/hjwp/pytest-icdiff which also shows nice diffs.

Probably one just need to determine if a custom diff hook is registered and use the pytest default diff again in this case.

Maybe we should use one if these anyway considering #125.

CarliJoy avatar Jun 06 '23 09:06 CarliJoy