From 769f03d7ff1709a43c0b82c131fae494f67cf08f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 13 Jan 2018 12:43:06 +0200 Subject: Add: show dict diffs in a way that's easier to understand --- yarns/900-implements.yarn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'yarns/900-implements.yarn') diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index 1a42198..59da6c7 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -108,7 +108,12 @@ along with this program. If not, see . expected_text = get_next_match() expected = json.loads(expected_text) actual = json.loads(vars['body']) - assertEqual(expected, actual) + print('expected', json.dumps(expected, indent=4)) + print('actual', json.dumps(actual, indent=4)) + diff = dict_diff(expected, actual) + if diff is not None: + print(diff) + assert 0 IMPLEMENTS THEN body text is "(.*)" expected = unescape(get_next_match()) -- cgit v1.2.1