File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
3
- from jsonpath_ng import parse as rw_parse
4
- from jsonpath_ng .exceptions import JSONPathError , JsonPathParserError
3
+ from jsonpath_ng import parse as base_parse
4
+ from jsonpath_ng .exceptions import JsonPathParserError
5
5
from jsonpath_ng .ext import parse as ext_parse
6
6
7
7
8
8
@pytest .mark .parametrize (
9
9
"path" ,
10
10
(
11
- 'foo[*.bar.baz' ,
12
- 'foo.bar.`grandparent`.baz' ,
13
- # error at the end of string
14
- 'foo[*' ,
11
+ "foo[*.bar.baz" ,
12
+ "foo.bar.`grandparent`.baz" ,
13
+ "foo[*" ,
15
14
# `len` extension not available in the base parser
16
- ' foo.bar.`len`' ,
17
- )
15
+ " foo.bar.`len`" ,
16
+ ),
18
17
)
19
18
def test_rw_exception_subclass (path ):
20
19
with pytest .raises (JsonPathParserError ):
21
- rw_parse (path )
20
+ base_parse (path )
22
21
23
22
24
23
@pytest .mark .parametrize (
25
24
"path" ,
26
25
(
27
- 'foo[*.bar.baz' ,
28
- 'foo.bar.`grandparent`.baz' ,
29
- # error at the end of string
30
- 'foo[*' ,
31
- )
26
+ "foo[*.bar.baz" ,
27
+ "foo.bar.`grandparent`.baz" ,
28
+ "foo[*" ,
29
+ ),
32
30
)
33
31
def test_ext_exception_subclass (path ):
34
32
with pytest .raises (JsonPathParserError ):
You can’t perform that action at this time.
0 commit comments