File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,25 @@ def test_contourf_decreasing_levels():
279
279
assert_equal (len (w ), 2 )
280
280
281
281
282
+ @cleanup
283
+ def test_vminvmax_warning ():
284
+ z = [[0.1 , 0.3 ], [0.5 , 0.7 ]]
285
+ plt .figure ()
286
+ cs = plt .contourf (z , [0.0 , 1.0 ])
287
+
288
+ with warnings .catch_warnings (record = True ) as w :
289
+ cs .vmin
290
+ assert len (w ) == 1
291
+ assert (str (w [0 ].message ).startswith (
292
+ ("vmin is deprecated and will be removed in 2.2 " )))
293
+
294
+ with warnings .catch_warnings (record = True ) as w :
295
+ cs .vmax
296
+ assert len (w ) == 1
297
+ assert (str (w [0 ].message ).startswith (
298
+ ("vmax is deprecated and will be removed in 2.2 " )))
299
+
300
+
282
301
if __name__ == '__main__' :
283
302
import nose
284
303
nose .runmodule (argv = ['-s' , '--with-doctest' ], exit = False )
You can’t perform that action at this time.
0 commit comments