Skip to content

Commit 87174fb

Browse files
committed
Modify unit test
1 parent d9426bf commit 87174fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/tests/io/json/test_pandas.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2324,4 +2324,8 @@ def test_dtypes_to_json_consistency(df: DataFrame):
23242324
# GH 61170
23252325
expected = df.dtypes.apply(str).to_json()
23262326
result = df.dtypes.to_json()
2327-
assert json.loads(result) == json.loads(expected)
2327+
result = json.loads(result)
2328+
for k in result:
2329+
if "name" in result[k]:
2330+
result[k] = result[k]["name"]
2331+
assert result == json.loads(expected)

0 commit comments

Comments
 (0)