Skip to content

Commit 23ae3c1

Browse files
committed
Update test_deprecated_kwargs.py
Use assert_produces_warning(None) context to check whether no warning is produced.
1 parent 61e51eb commit 23ae3c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/tests/io/json/test_deprecated_kwargs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_good_kwargs():
3232
argument passed as keyword.
3333
"""
3434
df = pd.DataFrame({"A": [2, 4, 6], "B": [3, 6, 9]}, index=[0, 1, 2])
35-
assert_frame_equal(df, read_json(df.to_json(orient="split"), orient="split"))
36-
assert_frame_equal(df, read_json(df.to_json(orient="columns"), orient="columns"))
37-
assert_frame_equal(df, read_json(df.to_json(orient="index"), orient="index"))
35+
with tm.assert_produces_warning(None):
36+
assert_frame_equal(df, read_json(df.to_json(orient="split"), orient="split"))
37+
assert_frame_equal(df, read_json(df.to_json(orient="columns"), orient="columns"))
38+
assert_frame_equal(df, read_json(df.to_json(orient="index"), orient="index"))

0 commit comments

Comments
 (0)