Skip to content

Commit 4733fff

Browse files
committed
refactor: move test
1 parent 67ddf83 commit 4733fff

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/matplotlib/tests/test_texmanager.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,3 @@ def test_font_selection(rc, preamble, family):
4242
src = Path(tm.make_tex("hello, world", fontsize=12)).read_text()
4343
assert preamble in src
4444
assert [*re.findall(r"\\\w+family", src)] == [family]
45-
46-
47-
def test_usetex_with_underscore():
48-
plt.rcParams["text.usetex"] = True
49-
df = {"a_b": range(5)[::-1], "c": range(5)}
50-
fig, ax = plt.subplots()
51-
ax.plot("c", "a_b", data=df)
52-
ax.legend()
53-
ax.text(0, 0, "foo_bar", usetex=True)
54-
plt.draw() # TeX rendering is done at draw time

lib/matplotlib/tests/test_usetex.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,13 @@ def test_textcomp_full():
105105
fig = plt.figure()
106106
fig.text(.5, .5, "hello, world", usetex=True)
107107
fig.canvas.draw()
108+
109+
110+
def test_usetex_with_underscore():
111+
plt.rcParams["text.usetex"] = True
112+
df = {"a_b": range(5)[::-1], "c": range(5)}
113+
fig, ax = plt.subplots()
114+
ax.plot("c", "a_b", data=df)
115+
ax.legend()
116+
ax.text(0, 0, "foo_bar", usetex=True)
117+
plt.draw() # TeX rendering is done at draw time

0 commit comments

Comments
 (0)