Skip to content

Commit

Permalink
Improve hypothesis test error message
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankoegl committed Apr 2, 2018
1 parent f301608 commit 7724ddd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,9 @@ def test_roundtrip(self, src, dst):
patch = jsonpatch.JsonPatch.from_diff(src, dst, False)
hypothesis.note('Patch: %s' % (patch,))
res = patch.apply(src)
self.assertEqual(res, dst)
message = '{src} + {patch} resulted in {res}; {dst} was expected'.format(
src=repr(src), patch=repr(patch), res=repr(res), dst=repr(dst))
self.assertEqual(res, dst, message)


if __name__ == '__main__':
Expand Down

0 comments on commit 7724ddd

Please sign in to comment.