@@ -166,7 +166,7 @@ def test_empty_array(self):
166
166
[
167
167
([{"a" : 0 }, {"a" : 1 }], None , None ),
168
168
({"a" : [{"a" : 0 }, {"a" : 1 }]}, "a" , None ),
169
- ('{"a": [{"a": 0}, {"a": 1}]}' , None , NotImplementedError ),
169
+ ('{"a": [{"a": 0}, {"a": 1}]}' , None , None ),
170
170
(None , None , NotImplementedError ),
171
171
],
172
172
)
@@ -630,15 +630,18 @@ def test_series_json_string_with_index(self):
630
630
tm .assert_frame_equal (result , expected )
631
631
632
632
def test_invalid_json_string (self ):
633
- invalid_json = '{"id": 1, "name": {"first": "John", "last": "Doe"'
633
+ incomplete_json = '{"id": 1, "name": {"first": "John", "last": "Doe"'
634
634
with pytest .raises (json .JSONDecodeError ):
635
- json_normalize (invalid_json )
635
+ json_normalize (incomplete_json )
636
636
637
- def test_non_json_string (self ):
638
637
non_json = "Hello World"
639
638
with pytest .raises (json .JSONDecodeError ):
640
639
json_normalize (non_json )
641
640
641
+ malformed_json = '{"a": 1,}'
642
+ with pytest .raises (json .JSONDecodeError ):
643
+ json_normalize (malformed_json )
644
+
642
645
643
646
class TestNestedToRecord :
644
647
def test_flat_stays_flat (self ):
0 commit comments