@@ -71,10 +71,12 @@ def setup_method(self, method):
7171 def test_autocorrelation_plot (self ):
7272 from pandas .plotting import autocorrelation_plot
7373
74- _check_plot_works (autocorrelation_plot , series = self .ts )
75- _check_plot_works (autocorrelation_plot , series = self .ts .values )
74+ # Ensure no UserWarning when making plot
75+ with tm .assert_produces_warning (None ):
76+ _check_plot_works (autocorrelation_plot , series = self .ts )
77+ _check_plot_works (autocorrelation_plot , series = self .ts .values )
7678
77- ax = autocorrelation_plot (self .ts , label = "Test" )
79+ ax = autocorrelation_plot (self .ts , label = "Test" )
7880 self ._check_legend_labels (ax , labels = ["Test" ])
7981
8082 def test_lag_plot (self ):
@@ -132,8 +134,9 @@ def test_andrews_curves(self, iris):
132134 from pandas .plotting import andrews_curves
133135
134136 df = iris
135-
136- _check_plot_works (andrews_curves , frame = df , class_column = "Name" )
137+ # Ensure no UserWarning when making plot
138+ with tm .assert_produces_warning (None ):
139+ _check_plot_works (andrews_curves , frame = df , class_column = "Name" )
137140
138141 rgba = ("#556270" , "#4ECDC4" , "#C7F464" )
139142 ax = _check_plot_works (
@@ -280,7 +283,9 @@ def test_radviz(self, iris):
280283 from pandas .plotting import radviz
281284
282285 df = iris
283- _check_plot_works (radviz , frame = df , class_column = "Name" )
286+ # Ensure no UserWarning when making plot
287+ with tm .assert_produces_warning (None ):
288+ _check_plot_works (radviz , frame = df , class_column = "Name" )
284289
285290 rgba = ("#556270" , "#4ECDC4" , "#C7F464" )
286291 ax = _check_plot_works (radviz , frame = df , class_column = "Name" , color = rgba )
0 commit comments