summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2018-04-02 17:09:18 +0200
committerStefan Kögl <stefan@skoegl.net>2018-04-02 17:09:18 +0200
commit7724ddd496c4cfb452edd59ff9bb9cd3d262c2b8 (patch)
tree914583938f0f42580f1195d1ffa82bf646deacf5
parentf301608cba9df042b6121e011ce188658109faf9 (diff)
downloadpython-json-patch-7724ddd496c4cfb452edd59ff9bb9cd3d262c2b8.tar.gz
Improve hypothesis test error message
-rwxr-xr-xtests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index e1b4300..6a00bd0 100755
--- a/tests.py
+++ b/tests.py
@@ -639,7 +639,9 @@ if hypothesis is not None:
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__':