File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def test_infinity(self):
126126
127127 def test_int_64 (self ):
128128 """
129- int 64-bit
129+ int 64-bit
130130 """
131131 for val in (9223372036854775807 , - 9223372036854775807 ):
132132 self .assertEqual (orjson .loads (str (val )), val )
@@ -209,11 +209,20 @@ def test_dict_large(self):
209209 self .assertEqual (len (obj ), 513 )
210210 self .assertEqual (orjson .loads (orjson .dumps (obj )), obj )
211211
212- def test_dict_invalid_key (self ):
212+ def test_dict_invalid_key_dumps (self ):
213213 """
214- dict invalid key
214+ dict invalid key dumps()
215215 """
216216 with self .assertRaises (orjson .JSONEncodeError ):
217217 orjson .dumps ({1 : 'value' })
218218 with self .assertRaises (orjson .JSONEncodeError ):
219219 orjson .dumps ({b'key' : 'value' })
220+
221+ def test_dict_invalid_key_loads (self ):
222+ """
223+ dict invalid key dumps()
224+ """
225+ with self .assertRaises (orjson .JSONDecodeError ):
226+ orjson .loads ('{1:"value"}' )
227+ with self .assertRaises (orjson .JSONDecodeError ):
228+ orjson .loads ('{{"a":true}:true}' )
You can’t perform that action at this time.
0 commit comments