8000 Don't turn check_for_pgf into public API. by anntzer · Pull Request #19643 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Don't turn check_for_pgf into public API. #19643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
8000
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setup():
set_reproducibility_for_testing()


def check_for_pgf(texsystem):
def _check_for_pgf(texsystem):
"""
Check if a given TeX system + pgf is available

Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_backend_bases.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import re

from matplotlib.testing import check_for_pgf
from matplotlib.testing import _check_for_pgf
from matplotlib.backend_bases import (
FigureCanvasBase, LocationEvent, MouseButton, MouseEvent,
NavigationToolbar2, RendererBase)
Expand All @@ -14,7 +14,7 @@
import numpy as np
import pytest

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


Expand Down
10 changes: 5 additions & 5 deletions lib/matplotlib/tests/test_backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.testing import _has_tex_package, check_for_pgf
from matplotlib.testing import _has_tex_package, _check_for_pgf
from matplotlib.testing.compare import compare_images, ImageComparisonFailure
from matplotlib.backends.backend_pgf import PdfPages, common_texification
from matplotlib.testing.decorators import (_image_directories,
Expand All @@ -17,11 +17,11 @@

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

needs_xelatex = pytest.mark.skipif(not check_for_pgf('xelatex'),
needs_xelatex = pytest.mark.skipif(not _check_for_pgf('xelatex'),
reason='xelatex + pgf is required')
needs_pdflatex = pytest.mark.skipif(not check_for_pgf('pdflatex'),
needs_pdflatex = pytest.mark.skipif(not _check_for_pgf('pdflatex'),
reason='pdflatex + pgf is required')
needs_lualatex = pytest.mark.skipif(not check_for_pgf('lualatex'),
needs_lualatex = pytest.mark.skipif(not _check_for_pgf('lualatex'),
reason='lualatex + pgf is required')
needs_ghostscript = pytest.mark.skipif(
"eps" not in mpl.testing.compare.converter,
Expand Down Expand Up @@ -311,7 +311,7 @@ def test_unknown_font(caplog):
@pytest.mark.parametrize("texsystem", ("pdflatex", "xelatex", "lualatex"))
@pytest.mark.backend("pgf")
def test_minus_signs_with_tex(fig_test, fig_ref, texsystem):
if not check_for_pgf(texsystem):
if not _check_for_pgf(texsystem):
pytest.skip(texsystem + ' + pgf is required')
mpl.rcParams["pgf.texsystem"] = texsystem
fig_test.text(.5, .5, "$-1$")
Expand Down
0