-
Notifications
You must be signed in to change notification settings - Fork 17
Better visualize differences in multiline strings #47
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
Conversation
thanks very much for the suggestion, and the PR! I think I'd defintely want something to improve string diffs. It occurs to me - wouldnt' we maybe want to do this kind of non-pprint diff on any string? like, all the time, and then we wouldn't need a special CLI option? i'd be keen to merge this without the CLI option, and just with an if that checks if both left and right are str. also we'd need a test. |
Thanks for the comments, I only added this option because I was afraid the pprint-ed strings were useful in certain situations. LMK if you want more tests added. |
assert "a" + " " * 36 in output | ||
assert "b" + " " * 36 in output | ||
assert "c" + " " * 36 in output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't quite understand what these asserts are doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think you can merge the PR or is there anything missing? |
merged with thanks! I might try and find the time to fiddle with that test assertion to make it more readable, but otherwise all good for now! will throw up a new release when i get a moment... |
I had the same issue as #14 where my multiline string difference was not very readable:

I added a command line option

--icdiff-multiline-string
. Running the same test withpytest --icdiff-multiline-string -vv
now returns a significantly more readable diff: