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

Skip to content

Commit fa2204e

Browse files
committed
Merge pull request #5770 from jenshnielsen/skiptex
Skip svg tex test if tex is not installed
2 parents 4ca39f7 + 16698e8 commit fa2204e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
import matplotlib.pyplot as plt
1111
from matplotlib.testing.decorators import cleanup
12-
from matplotlib.testing.decorators import image_comparison
12+
from matplotlib.testing.decorators import image_comparison, knownfailureif
13+
import matplotlib
14+
15+
needs_tex = knownfailureif(
16+
not matplotlib.checkdep_tex(),
17+
"This test needs a TeX installation")
1318

1419

1520
@cleanup
@@ -173,6 +178,7 @@ def test_determinism_notex():
173178

174179

175180
@cleanup
181+
@needs_tex
176182
def test_determinism_tex():
177183
# unique filename to allow for parallel testing
178184
_test_determinism('determinism_tex.svg', usetex=True)

lib/matplotlib/textpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
345345
1094995778)]:
346346
try:
347347
font.select_charmap(charmap_code)
348-
except ValueError:
348+
except (ValueError, RuntimeError):
349349
pass
350350
else:
351351
break

0 commit comments

Comments
 (0)