8000 Update cmr10 minus sign test · matplotlib/matplotlib@d4d701a · GitHub
[go: up one dir, main page]

Skip to content

Commit d4d701a

Browse files
casperdcltimhoffm
andcommitted
Update cmr10 minus sign test
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent 0503854 commit d4d701a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/tests/test_mathtext.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,12 @@ def test_math_fontfamily():
387387
size=24, math_fontfamily='stix')
388388

389389

390-
def test_mathtext_fontfamily():
390+
def test_mathtext_cmr10_minus_sign():
391+
# cmr10 does not contain a minus sign and used to issue a warning
392+
# RuntimeWarning: Glyph 8722 missing from current font.
391393
mpl.rcParams['font.family'] = 'cmr10'
392394
fig, ax = plt.subplots()
393395
ax.plot(range(-1, 1), range(-1, 1))
396+
with pytest.warns(None) as record:
397+
fig.canvas.draw()
398+
assert len(record) == 0

0 commit comments

Comments
 (0)
0