Skip to content
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

Show pytest-clarity diff if installed #122

Open
CarliJoy opened this issue Feb 7, 2023 · 2 comments
Open

Show pytest-clarity diff if installed #122

CarliJoy opened this issue Feb 7, 2023 · 2 comments

Comments

@CarliJoy
Copy link

CarliJoy commented Feb 7, 2023

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.

@nicoddemus
Copy link
Member

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.

@CarliJoy
Copy link
Author

CarliJoy commented Jun 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants