diff options
author | José Manuel Fardello <jmfardello@gmail.com> | 2013-08-25 14:55:05 +0200 |
---|---|---|
committer | José Manuel Fardello <jmfardello@gmail.com> | 2013-08-25 14:55:05 +0200 |
commit | f02155b629760b74ba52d2ebc52052ffec5883bf (patch) | |
tree | c2d51abbb007dc66887e3c3c70104b3d34a3ffd8 | |
parent | 409b3d0a3cab945415e0428c16a0e97c18622669 (diff) | |
download | jsonpath-rw-f02155b629760b74ba52d2ebc52052ffec5883bf.tar.gz |
* Fix TestJsonPath.test_hyphen_key on Python 2.6
- Changed assertRaises in TestJsonPath.test_hyphen_key to 2.6
unittest syntax.
-rw-r--r-- | tests/test_jsonpath.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_jsonpath.py b/tests/test_jsonpath.py index 6796226..bf3d5c6 100644 --- a/tests/test_jsonpath.py +++ b/tests/test_jsonpath.py @@ -166,8 +166,8 @@ class TestJsonPath(unittest.TestCase): self.check_cases([('foo.bar-baz', {'foo': {'bar-baz': 3}}, [3]), ('foo.[bar-baz,blah-blah]', {'foo': {'bar-baz': 3, 'blah-blah':5}}, [3,5])]) - with self.assertRaises(JsonPathLexerError): - self.check_cases([('foo.-baz', {'foo': {'-baz': 8}}, [8])]) + self.assertRaises(JsonPathLexerError, self.check_cases, + [('foo.-baz', {'foo': {'-baz': 8}}, [8])]) |