|
9 | 9 | import pytest |
10 | 10 |
|
11 | 11 | import matplotlib as mpl |
12 | | -from matplotlib import dviread, pyplot as plt, checkdep_usetex, rcParams |
| 12 | +from matplotlib import pyplot as plt, checkdep_usetex, rcParams |
13 | 13 | from matplotlib.cbook import _get_data_path |
14 | 14 | from matplotlib.ft2font import FT2Font |
15 | 15 | from matplotlib.backends._backend_pdf_ps import get_glyphs_subset |
@@ -295,23 +295,6 @@ def test_grayscale_alpha(): |
295 | 295 | ax.set_yticks([]) |
296 | 296 |
|
297 | 297 |
|
298 | | -# This tests tends to hit a TeX cache lock on AppVeyor. |
299 | | -@pytest.mark.flaky(reruns=3) |
300 | | -@needs_usetex |
301 | | -def test_missing_psfont(monkeypatch): |
302 | | - """An error is raised if a TeX font lacks a Type-1 equivalent""" |
303 | | - def psfont(*args, **kwargs): |
304 | | - return dviread.PsFont(texname='texfont', psname='Some Font', |
305 | | - effects=None, encoding=None, filename=None) |
306 | | - |
307 | | - monkeypatch.setattr(dviread.PsfontsMap, '__getitem__', psfont) |
308 | | - rcParams['text.usetex'] = True |
309 | | - fig, ax = plt.subplots() |
310 | | - ax.text(0.5, 0.5, 'hello') |
311 | | - with NamedTemporaryFile() as tmpfile, pytest.raises(ValueError): |
312 | | - fig.savefig(tmpfile, format='pdf') |
313 | | - |
314 | | - |
315 | 298 | @mpl.style.context('default') |
316 | 299 | @check_figures_equal(extensions=["pdf", "eps"]) |
317 | 300 | def test_pdf_eps_savefig_when_color_is_none(fig_test, fig_ref): |
|
0 commit comments