Skip to content

Commit f02155b

Browse files
committed
* Fix TestJsonPath.test_hyphen_key on Python 2.6
- Changed assertRaises in TestJsonPath.test_hyphen_key to 2.6 unittest syntax.
1 parent 409b3d0 commit f02155b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_jsonpath.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def test_hyphen_key(self):
166166
self.check_cases([('foo.bar-baz', {'foo': {'bar-baz': 3}}, [3]),
167167
('foo.[bar-baz,blah-blah]', {'foo': {'bar-baz': 3, 'blah-blah':5}},
168168
[3,5])])
169-
with self.assertRaises(JsonPathLexerError):
170-
self.check_cases([('foo.-baz', {'foo': {'-baz': 8}}, [8])])
169+
self.assertRaises(JsonPathLexerError, self.check_cases,
170+
[('foo.-baz', {'foo': {'-baz': 8}}, [8])])
171171

172172

173173

0 commit comments

Comments
 (0)