Skip to content

Commit

Permalink
Add a unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ateska committed Mar 22, 2024
1 parent 303fc91 commit a589eb0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_document/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,11 @@ def test_loads_01(self):
self.assertEqual(json_parsed['foo'], 'bar')



def test_jsonpointer_01(self):
parser = cysimdjson.JSONParser()
with open(os.path.join(THIS_DIR, 'document.json'), 'rb') as fo:
json_parsed = parser.parse(fo.read())

with self.assertRaises(ValueError):
json_parsed.at_pointer("/document/key4/sub")

0 comments on commit a589eb0

Please sign in to comment.