Skip to content

Commit a688468

Browse files
committed
TST: added xfail test for json.decode Series with long int
1 parent 6053227 commit a688468

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
@@ -1247,9 +1247,14 @@ def test_read_jsonl_unicode_chars(self):
12471247
def test_to_json_large_numbers(self, bigNum):
12481248
# GH34473
12491249
series = Series(bigNum, dtype=object, index=["articleId"])
1250-
result = series.to_json()
1250+
json = series.to_json()
12511251
expected = '{"articleId":' + str(bigNum) + "}"
1252-
assert result == expected
1252+
assert json == expected
1253+
# GH 20599
1254+
with pytest.raises(ValueError):
1255+
json = StringIO(json)
1256+
result = read_json(json)
1257+
tm.assert_series_equal(series, result)
12531258

12541259
df = DataFrame(bigNum, dtype=object, index=["articleId"], columns=[0])
12551260
result = df.to_json()

0 commit comments

Comments
 (0)