Closed MaksimMisin closed 7 months ago
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.
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 https://github.com/hjwp/pytest-icdiff/issues/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: