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

Skip to content

Commit 77d4e52

Browse files
committed
Add test case for mathnormal
Ensure that \mathnormal is parsed and sets digits upright.
1 parent a6913f3 commit 77d4e52

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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)