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

Skip to content

Commit e912e8b

Browse files
authored
Merge pull request #19643 from anntzer/ucfp
Don't turn check_for_pgf into public API.
2 parents ab62030 + 7c62e05 commit e912e8b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/matplotlib/testing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def setup():
4949
set_reproducibility_for_testing()
5050

5151

52-
def check_for_pgf(texsystem):
52+
def _check_for_pgf(texsystem):
5353
"""
5454
Check if a given TeX system + pgf is available
5555

lib/matplotlib/tests/test_backend_bases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import re
22

3-
from matplotlib.testing import check_for_pgf
3+
from matplotlib.testing import _check_for_pgf
44
from matplotlib.backend_bases import (
55
FigureCanvasBase, LocationEvent, MouseButton, MouseEvent,
66
NavigationToolbar2, RendererBase)
@@ -14,7 +14,7 @@
1414
import numpy as np
1515
import pytest
1616

17-
needs_xelatex = pytest.mark.skipif(not check_for_pgf('xelatex'),
17+
needs_xelatex = pytest.mark.skipif(not _check_for_pgf('xelatex'),
1818
reason='xelatex + pgf is required')
1919

2020

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import matplotlib as mpl
1010
import matplotlib.pyplot as plt
11-
from matplotlib.testing import _has_tex_package, check_for_pgf
11+
from matplotlib.testing import _has_tex_package, _check_for_pgf
1212
from matplotlib.testing.compare import compare_images, ImageComparisonFailure
1313
from matplotlib.backends.backend_pgf import PdfPages, common_texification
1414
from matplotlib.testing.decorators import (_image_directories,
@@ -17,11 +17,11 @@
1717

1818
baseline_dir, result_dir = _image_directories(lambda: 'dummy func')
1919

20-
needs_xelatex = pytest.mark.skipif(not check_for_pgf('xelatex'),
20+
needs_xelatex = pytest.mark.skipif(not _check_for_pgf('xelatex'),
2121
reason='xelatex + pgf is required')
22-
needs_pdflatex = pytest.mark.skipif(not check_for_pgf('pdflatex'),
22+
needs_pdflatex = pytest.mark.skipif(not _check_for_pgf('pdflatex'),
2323
reason='pdflatex + pgf is required')
24-
needs_lualatex = pytest.mark.skipif(not check_for_pgf('lualatex'),
24+
needs_lualatex = pytest.mark.skipif(not _check_for_pgf('lualatex'),
2525
reason='lualatex + pgf is required')
2626
needs_ghostscript = pytest.mark.skipif(
2727
"eps" not in mpl.testing.compare.converter,
@@ -311,7 +311,7 @@ def test_unknown_font(caplog):
311311
@pytest.mark.parametrize("texsystem", ("pdflatex", "xelatex", "lualatex"))
312312
@pytest.mark.backend("pgf")
313313
def test_minus_signs_with_tex(fig_test, fig_ref, texsystem):
314-
if not check_for_pgf(texsystem):
314+
if not _check_for_pgf(texsystem):
315315
pytest.skip(texsystem + ' + pgf is required')
316316
mpl.rcParams["pgf.texsystem"] = texsystem
317317
fig_test.text(.5, .5, "$-1$")

0 commit comments

Comments
 (0)