Skip to content

Commit 6787b8b

Browse files
authored
TST: Address/catch more test warnings (#48358)
1 parent 480d6be commit 6787b8b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

pandas/io/date_converters.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def generic_parser(parse_func, *cols) -> np.ndarray:
9292
"""
9393

9494
warnings.warn(
95-
"""
96-
Use pd.to_datetime instead.
97-
""",
95+
"Use pd.to_datetime instead.",
9896
FutureWarning,
9997
stacklevel=find_stack_level(inspect.currentframe()),
10098
)

pandas/tests/frame/methods/test_fillna.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,6 @@ def test_fillna_nonconsolidated_frame():
777777
],
778778
columns=["i1", "i2", "i3", "f1"],
779779
)
780-
df_nonconsol = df.pivot("i1", "i2")
780+
df_nonconsol = df.pivot(index="i1", columns="i2")
781781
result = df_nonconsol.fillna(0)
782782
assert result.isna().sum().sum() == 0

pandas/tests/plotting/frame/test_frame.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def test_plot(self):
7070

7171
ax = _check_plot_works(df.plot, use_index=True)
7272
self._check_ticks_props(ax, xrot=0)
73-
_check_plot_works(df.plot, sort_columns=False)
73+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
74+
_check_plot_works(df.plot, sort_columns=False)
7475
_check_plot_works(df.plot, yticks=[1, 5, 10])
7576
_check_plot_works(df.plot, xticks=[1, 5, 10])
7677
_check_plot_works(df.plot, ylim=(-100, 100), xlim=(-100, 100))

0 commit comments

Comments
 (0)