File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,21 +81,21 @@ def test_minus_no_descent(fontsize):
81
81
assert len ({* heights .values ()}) == 1
82
82
83
83
84
- @pytest .mark .skipif (_has_tex_package ('xcolor.sty' ),
84
+ @pytest .mark .skipif (not _has_tex_package ('xcolor.sty' ),
85
85
reason = 'xcolor is not available' )
86
86
def test_usetex_xcolor ():
87
87
mpl .rcParams ['text.usetex' ] = True
88
88
89
89
fig = plt .figure ()
90
- t = fig .text (0.5 , 0.5 , "Some text 0123456789" )
90
+ text = fig .text (0.5 , 0.5 , "Some text 0123456789" )
91
91
fig .canvas .draw ()
92
- pos = t .get_window_extent ()
93
92
94
93
mpl .rcParams ['text.latex.preamble' ] = r'\usepackage[dvipsnames]{xcolor}'
95
94
fig = plt .figure ()
96
- t = fig .text (0.5 , 0.5 , "Some text 0123456789" )
95
+ text2 = fig .text (0.5 , 0.5 , "Some text 0123456789" )
97
96
fig .canvas .draw ()
98
- np .testing .assert_array_equal (t .get_window_extent (), pos )
97
+ np .testing .assert_array_equal (text2 .get_window_extent (),
98
+ text .get_window_extent ())
99
99
100
100
101
101
def test_textcomp_full ():
You can’t perform that action at this time.
0 commit comments