File tree 1 file changed +6
-3
lines changed 1 file changed +6
-3
lines changed 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
2
2
import matplotlib .pyplot as plt
3
3
from matplotlib .scale import Log10Transform , InvertedLog10Transform
4
+ from matplotlib .testing .decorators import check_figures_equal , image_comparison
4
5
5
6
import numpy as np
6
7
import io
@@ -91,7 +92,8 @@ def test_logscale_invert_transform():
91
92
tform = (ax .transAxes + ax .transData .inverted ()).inverted ()
92
93
93
94
# direct test of log transform inversion
94
- assert isinstance (Log10Transform ().inverted (), InvertedLog10Transform )
95
+ with pytest .warns (MatplotlibDeprecationWarning ):
96
+ assert isinstance (Log10Transform ().inverted (), InvertedLog10Transform )
95
97
96
98
97
99
def test_logscale_transform_repr ():
@@ -101,7 +103,8 @@ def test_logscale_transform_repr():
101
103
s = repr (ax .transData )
102
104
103
105
# check that repr of log transform succeeds
104
- s = repr (Log10Transform (nonpos = 'clip' ))
106
+ with pytest .warns (MatplotlibDeprecationWarning ):
107
+ s = repr (Log10Transform (nonpos = 'clip' ))
105
108
106
109
107
110
@image_comparison (baseline_images = ['logscale_nonpos_values' ], remove_text = True ,
You can’t perform that action at this time.
0 commit comments