Skip to content

Commit 9052499

Browse files
domdfcodingmichaelmior
authored andcommitted
Escape back slashes in tests to avoid DeprecationWarning.
1 parent da0b379 commit 9052499

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_jsonpath_rw_ext.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ class Testjsonpath_ng_ext(testscenarios.WithScenarios,
126126
{'cat': 2, 'cow': 1},
127127
{'cat': 3, 'cow': 3}]},
128128
target=2)),
129-
('sort2', dict(string='objects[\cat]',
129+
('sort2', dict(string='objects[\\cat]',
130130
data={'objects': [{'cat': 2}, {'cat': 1}, {'cat': 3}]},
131131
target=[[{'cat': 3}, {'cat': 2}, {'cat': 1}]])),
132-
('sort2_indexed', dict(string='objects[\cat][-1].cat',
132+
('sort2_indexed', dict(string='objects[\\cat][-1].cat',
133133
data={'objects': [{'cat': 2}, {'cat': 1},
134134
{'cat': 3}]},
135135
target=1)),
136-
('sort3', dict(string='objects[/cow,\cat]',
136+
('sort3', dict(string='objects[/cow,\\cat]',
137137
data={'objects': [{'cat': 1, 'cow': 2},
138138
{'cat': 2, 'cow': 1},
139139
{'cat': 3, 'cow': 1},
@@ -142,7 +142,7 @@ class Testjsonpath_ng_ext(testscenarios.WithScenarios,
142142
{'cat': 2, 'cow': 1},
143143
{'cat': 1, 'cow': 2},
144144
{'cat': 3, 'cow': 3}]])),
145-
('sort3_indexed', dict(string='objects[/cow,\cat][0].cat',
145+
('sort3_indexed', dict(string='objects[/cow,\\cat][0].cat',
146146
data={'objects': [{'cat': 1, 'cow': 2},
147147
{'cat': 2, 'cow': 1},
148148
{'cat': 3, 'cow': 1},

0 commit comments

Comments
 (0)