views:

12

answers:

0

Anyone know of any pre-existing tools out there what will highlight differences in output when running Django tests?

I'm comparing some JSON output and it's tough to find things like extra spaces. I was about to just copy and paste this into an existing diff tool but I figured this might be on someone's radar.

Currently I see something like this:

'{"type": "TestItem", "djangoPayload": true, "payload": [{"type": "TestItem", "djangoPayload": true, "payload": "I am a Test"}, {"type": "TestItem", "djangoPayload": true, "payload": "I am a Test"}]}' != '{"type": "TestItem", "djangoPayload": true, "payload": [{"type": "TestItem", "djangoPayload": true, "payload": "I am a Test"},{"type": "TestItem", "djangoPayload": true, "payload": "I am a Test"}]}'

It'd be helpful if the missing space between the }, { was highlighted as I'm building this by hand. Though I'm open to advice/opinions regarding whether this kind of test can/should be made less brittle by normalizing whitespace.