8000 Merge pull request #15557 from anntzer/pgfsfmath · matplotlib/matplotlib@4f7f2e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f7f2e9

Browse files
authored
Merge pull request #15557 from anntzer/pgfsfmath
TST: Skip failing pgf test when sfmath.sty is not present.
2 parents 062c517 + 9b45f55 commit 4f7f2e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ def check_for(texsystem):
4444
reason='lualatex + pgf is required')
4545

4646

47+
def _has_sfmath():
48+
return (shutil.which("kpsewhich")
49+
and subprocess.run(["kpsewhich", "sfmath.sty"],
50+
stdout=subprocess.PIPE).returncode == 0)
51+
52+
4753
def compare_figure(fname, savefig_kwargs={}, tol=0):
4854
actual = os.path.join(result_dir, fname)
4955
plt.savefig(actual, **savefig_kwargs)
@@ -113,6 +119,7 @@ def test_pdflatex():
113119
# test updating the rc parameters for each figure
114120
@needs_xelatex
115121
@needs_pdflatex
122+
@pytest.mark.skipif(not _has_sfmath(), reason='needs sfmath.sty')
116123
@pytest.mark.style('default')
117124
@pytest.mark.backend('pgf')
118125
def test_rcupdate():

0 commit comments

Comments
 (0)
0