@@ -71,10 +71,12 @@ def setup_method(self, method):
71
71
def test_autocorrelation_plot (self ):
72
72
from pandas .plotting import autocorrelation_plot
73
73
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 )
76
78
77
- ax = autocorrelation_plot (self .ts , label = "Test" )
79
+ ax = autocorrelation_plot (self .ts , label = "Test" )
78
80
self ._check_legend_labels (ax , labels = ["Test" ])
79
81
80
82
def test_lag_plot (self ):
@@ -132,8 +134,9 @@ def test_andrews_curves(self, iris):
132
134
from pandas .plotting import andrews_curves
133
135
134
136
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" )
137
140
138
141
rgba = ("#556270" , "#4ECDC4" , "#C7F464" )
139
142
ax = _check_plot_works (
@@ -280,7 +283,9 @@ def test_radviz(self, iris):
280
283
from pandas .plotting import radviz
281
284
282
285
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" )
284
289
285
290
rgba = ("#556270" , "#4ECDC4" , "#C7F464" )
286
291
ax = _check_plot_works (radviz , frame = df , class_column = "Name" , color = rgba )
0 commit comments