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 diff for large objects #64

Open
rickeylev opened this issue Jul 11, 2023 · 1 comment
Open

Show diff for large objects #64

rickeylev opened this issue Jul 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@rickeylev
Copy link
Collaborator

When large objects are compared, it makes the resulting errors hard to visually see what the differences are. This occurs with both large strings (e.g. generated BUILD file content for repository rule utilties) and large collections (e.g. the argv of a cc link command).

A diff would help draw attention to the parts of the expects vs actual that actually differ.

@rickeylev rickeylev added the enhancement New feature or request label Jul 11, 2023
@aignas
Copy link

aignas commented Jul 22, 2023

+1 for this feature, right now I have to change:

that_str(got).equals(want)

to

that_collection(got.splitlines()).contains_exactly(want.splitlines())

However, this is not really equivalent, as the line endings may interfere with the result.

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

No branches or pull requests

2 participants