add test for out-of-bounds error

This commit is contained in:
Stefan Kögl
2013-07-11 21:05:56 +02:00
parent 51cb6b6aca
commit 5bf2ef97f7

View File

@@ -86,6 +86,10 @@ class WrongInputTests(unittest.TestCase):
doc = [0, 1, 2]
self.assertRaises(JsonPointerException, resolve_pointer, doc, '/a')
def test_oob(self):
# this list does not have 10 members
doc = [0, 1, 2]
self.assertRaises(JsonPointerException, resolve_pointer, doc, '/10')
suite = unittest.TestSuite()