X Tutup
Skip to content

Commit 80a4031

Browse files
committed
Add test case for mathnormal
Ensure that \mathnormal is parsed and sets digits upright.
1 parent fbf7292 commit 80a4031

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_mathtext.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,13 @@ def test_boldsymbol(fig_test, fig_ref):
571571
fig_ref.text(0.1, 0.2, r"$\mathrm{abc0123\alpha}$")
572572

573573

574+
@check_figures_equal()
575+
def test_mathnormal(fig_test, fig_ref):
576+
# ensure that \mathnormal is parsed and sets digits upright
577+
fig_test.text(0.1, 0.2, r"$\mathnormal{0123456789}$")
578+
fig_ref.text(0.1, 0.2, r"$\mathrm{0123456789}$")
579+
580+
574581
def test_box_repr():
575582
s = repr(_mathtext.Parser().parse(
576583
r"$\frac{1}{2}$",

0 commit comments

Comments
 (0)
X Tutup