@@ -95,18 +95,18 @@ def check_cases(self, test_cases):
9595 if isinstance (target , list ):
9696 assert [r .value for r in result ] == target
9797 elif isinstance (target , set ):
98- assert { r .value for r in result } == target
98+ assert set ([ r .value for r in result ]) == target
9999 else :
100100 assert result .value == target
101101
102102 def test_fields_value (self ):
103103 jsonpath .auto_id_field = None
104104 self .check_cases ([ ('foo' , {'foo' : 'baz' }, ['baz' ]),
105105 ('foo,baz' , {'foo' : 1 , 'baz' : 2 }, [1 , 2 ]),
106- ('*' , {'foo' : 1 , 'baz' : 2 }, { 1 , 2 } ) ])
106+ ('*' , {'foo' : 1 , 'baz' : 2 }, set ([ 1 , 2 ]) ) ])
107107
108108 jsonpath .auto_id_field = 'id'
109- self .check_cases ([ ('*' , {'foo' : 1 , 'baz' : 2 }, { 1 , 2 , '@' } ) ])
109+ self .check_cases ([ ('*' , {'foo' : 1 , 'baz' : 2 }, set ([ 1 , 2 , '@' ]) ) ])
110110
111111 def test_index_value (self ):
112112 self .check_cases ([
@@ -154,18 +154,18 @@ def check_paths(self, test_cases):
154154 if isinstance (target , list ):
155155 assert [str (r .full_path ) for r in result ] == target
156156 elif isinstance (target , set ):
157- assert { str (r .full_path ) for r in result } == target
157+ assert set ([ str (r .full_path ) for r in result ]) == target
158158 else :
159159 assert str (result .path ) == target
160160
161161 def test_fields_paths (self ):
162162 jsonpath .auto_id_field = None
163163 self .check_paths ([ ('foo' , {'foo' : 'baz' }, ['foo' ]),
164164 ('foo,baz' , {'foo' : 1 , 'baz' : 2 }, ['foo' , 'baz' ]),
165- ('*' , {'foo' : 1 , 'baz' : 2 }, { 'foo' , 'baz' } ) ])
165+ ('*' , {'foo' : 1 , 'baz' : 2 }, set ([ 'foo' , 'baz' ]) ) ])
166166
167167 jsonpath .auto_id_field = 'id'
168- self .check_paths ([ ('*' , {'foo' : 1 , 'baz' : 2 }, { 'foo' , 'baz' , 'id' } ) ])
168+ self .check_paths ([ ('*' , {'foo' : 1 , 'baz' : 2 }, set ([ 'foo' , 'baz' , 'id' ]) ) ])
169169
170170 def test_index_paths (self ):
171171 self .check_paths ([('[0]' , [42 ], ['[0]' ]),
@@ -195,7 +195,7 @@ def test_fields_auto_id(self):
195195 ('*.id' ,
196196 {'foo' :{'id' : 1 },
197197 'baz' : 2 },
198- { '1' , 'baz' } ) ])
198+ set ([ '1' , 'baz' ]) ) ])
199199
200200 def test_index_auto_id (self ):
201201 jsonpath .auto_id_field = "id"
0 commit comments