File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- from matplotlib .testing . decorators import check_figures_equal , image_comparison
1+ from matplotlib .cbook import MatplotlibDeprecationWarning
22import matplotlib .pyplot as plt
33from matplotlib .scale import Log10Transform , InvertedLog10Transform
4+ from matplotlib .testing .decorators import check_figures_equal , image_comparison
45
56import numpy as np
67import io
@@ -91,7 +92,8 @@ def test_logscale_invert_transform():
9192 tform = (ax .transAxes + ax .transData .inverted ()).inverted ()
9293
9394 # direct test of log transform inversion
94- assert isinstance (Log10Transform ().inverted (), InvertedLog10Transform )
95+ with pytest .warns (MatplotlibDeprecationWarning ):
96+ assert isinstance (Log10Transform ().inverted (), InvertedLog10Transform )
9597
9698
9799def test_logscale_transform_repr ():
@@ -101,7 +103,8 @@ def test_logscale_transform_repr():
101103 s = repr (ax .transData )
102104
103105 # check that repr of log transform succeeds
104- s = repr (Log10Transform (nonpos = 'clip' ))
106+ with pytest .warns (MatplotlibDeprecationWarning ):
107+ s = repr (Log10Transform (nonpos = 'clip' ))
105108
106109
107110@image_comparison (baseline_images = ['logscale_nonpos_values' ], remove_text = True ,
You can’t perform that action at this time.
0 commit comments