Skip to content

Commit 16d1f88

Browse files
Adding test to check for FutureWarning
1 parent b5f11fd commit 16d1f88

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/tests/plotting/test_misc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import pandas.util._test_decorators as td
1111

12-
from pandas import DataFrame
12+
from pandas import DataFrame, Series
1313
from pandas.tests.plotting.common import TestPlotBase, _check_plot_works
1414
import pandas.util.testing as tm
1515

@@ -25,6 +25,12 @@ def test_import_error_message():
2525
df.plot()
2626

2727

28+
@td.skip_if_no_mpl
29+
def test_series_plot_with_positional_arguments_warns():
30+
with tm.assert_produces_warning(FutureWarning):
31+
Series([1, 2, 3]).plot('line', None)
32+
33+
2834
@td.skip_if_no_mpl
2935
class TestSeriesPlots(TestPlotBase):
3036

0 commit comments

Comments
 (0)