@@ -166,7 +166,7 @@ def test_empty_array(self):
166166 [
167167 ([{"a" : 0 }, {"a" : 1 }], None , None ),
168168 ({"a" : [{"a" : 0 }, {"a" : 1 }]}, "a" , None ),
169- ('{"a": [{"a": 0}, {"a": 1}]}' , None , NotImplementedError ),
169+ ('{"a": [{"a": 0}, {"a": 1}]}' , None , None ),
170170 (None , None , NotImplementedError ),
171171 ],
172172 )
@@ -630,15 +630,18 @@ def test_series_json_string_with_index(self):
630630 tm .assert_frame_equal (result , expected )
631631
632632 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"'
634634 with pytest .raises (json .JSONDecodeError ):
635- json_normalize (invalid_json )
635+ json_normalize (incomplete_json )
636636
637- def test_non_json_string (self ):
638637 non_json = "Hello World"
639638 with pytest .raises (json .JSONDecodeError ):
640639 json_normalize (non_json )
641640
641+ malformed_json = '{"a": 1,}'
642+ with pytest .raises (json .JSONDecodeError ):
643+ json_normalize (malformed_json )
644+
642645
643646class TestNestedToRecord :
644647 def test_flat_stays_flat (self ):
0 commit comments