From 5bf2ef97f7c599b54c9632c1e9c544f71153d9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20K=C3=B6gl?= Date: Thu, 11 Jul 2013 21:05:56 +0200 Subject: add test for out-of-bounds error --- tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests.py b/tests.py index 9d4ca59..10a56e8 100755 --- a/tests.py +++ b/tests.py @@ -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() -- cgit v1.2.1