Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4725c55

Browse files
tacaswelltimhoffm
authored andcommitted
TST: fix skip logic and make test symmetric
Co-authored-by: Tim Hoffmann <[email protected]>
1 parent dc9b721 commit 4725c55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/tests/test_usetex.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ def test_usetex_xcolor():
8787
mpl.rcParams['text.usetex'] = True
8888

8989
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")
9191
fig.canvas.draw()
92-
pos = t.get_window_extent()
9392

9493
mpl.rcParams['text.latex.preamble'] = r'\usepackage[dvipsnames]{xcolor}'
9594
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")
9796
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())
9999

100100

101101
def test_textcomp_full():

0 commit comments

Comments
 (0)