Skip to content

Commit 9e1b95f

Browse files
committed
TST: added xfail test for json.decode DataFrame with long int
1 parent a688468 commit 9e1b95f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/tests/io/json/test_pandas.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1257,9 +1257,14 @@ def test_to_json_large_numbers(self, bigNum):
12571257
tm.assert_series_equal(series, result)
12581258

12591259
df = DataFrame(bigNum, dtype=object, index=["articleId"], columns=[0])
1260-
result = df.to_json()
1260+
json = df.to_json()
12611261
expected = '{"0":{"articleId":' + str(bigNum) + "}}"
1262-
assert result == expected
1262+
assert json == expected
1263+
# GH 20599
1264+
with pytest.raises(ValueError):
1265+
json = StringIO(json)
1266+
result = read_json(json)
1267+
tm.assert_frame_equal(df, result)
12631268

12641269
def test_read_json_large_numbers(self):
12651270
# GH18842

0 commit comments

Comments
 (0)