diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-01-13 12:43:06 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-01-14 22:23:43 +0200 |
commit | 769f03d7ff1709a43c0b82c131fae494f67cf08f (patch) | |
tree | 6ca9d6fa1116c16d1bf71ebe0839e867f73066ac /yarns/900-implements.yarn | |
parent | 4c6243ba5daaaab525e6c8ca866d5ebcb9f81dcf (diff) | |
download | ick2-769f03d7ff1709a43c0b82c131fae494f67cf08f.tar.gz |
Add: show dict diffs in a way that's easier to understand
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r-- | yarns/900-implements.yarn | 7 |
1 files changed, 6 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. 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()) |