summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext_tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext_tests.py b/ext_tests.py
index 5e5ded8..0e1404c 100755
--- a/ext_tests.py
+++ b/ext_tests.py
@@ -60,12 +60,15 @@ class TestCaseTemplate(unittest.TestCase):
)
else:
- res = jsonpatch.apply_patch(test['doc'], test['patch'])
+ try:
+ res = jsonpatch.apply_patch(test['doc'], test['patch'])
+ except jsonpatch.JsonPatchException as jpe:
+ raise Exception(test.get('comment', '')) from jpe
# if there is no 'expected' we only verify that applying the patch
# does not raies an exception
if 'expected' in test:
- self.assertEquals(res, test['expected'])
+ self.assertEquals(res, test['expected'], test.get('comment', ''))
def make_test_case(tests):