Download lib/python3.12/site-packages/matplotlib/testing/_markers.py from parallel-reasoner/env-full: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/parallel-reasoner/env-full/resolve/5279a7e481db165d35c63ff97b76e11bcc4370fb/lib/python3.12/site-packages/matplotlib/testing/_markers.py
- Command line
-
hf download hf://parallel-reasoner/env-full@5279a7e481db165d35c63ff97b76e11bcc4370fb/lib/python3.12/site-packages/matplotlib/testing/_markers.py
-
curl -L -o _markers.py https://huggingface.co/parallel-reasoner/env-full/resolve/5279a7e481db165d35c63ff97b76e11bcc4370fb/lib/python3.12/site-packages/matplotlib/testing/_markers.py
1.42 kB
| """ | |
| pytest markers for the internal Matplotlib test suite. | |
| """ | |
| import logging | |
| import shutil | |
| import pytest | |
| import matplotlib.testing | |
| import matplotlib.testing.compare | |
| from matplotlib import _get_executable_info, ExecutableNotFoundError | |
| _log = logging.getLogger(__name__) | |
| def _checkdep_usetex() -> bool: | |
| if not shutil.which("tex"): | |
| _log.warning("usetex mode requires TeX.") | |
| return False | |
| try: | |
| _get_executable_info("dvipng") | |
| except ExecutableNotFoundError: | |
| _log.warning("usetex mode requires dvipng.") | |
| return False | |
| try: | |
| _get_executable_info("gs") | |
| except ExecutableNotFoundError: | |
| _log.warning("usetex mode requires ghostscript.") | |
| return False | |
| return True | |
| needs_ghostscript = pytest.mark.skipif( | |
| "eps" not in matplotlib.testing.compare.converter, | |
| reason="This test needs a ghostscript installation") | |
| needs_pgf_lualatex = pytest.mark.skipif( | |
| not matplotlib.testing._check_for_pgf('lualatex'), | |
| reason='lualatex + pgf is required') | |
| needs_pgf_pdflatex = pytest.mark.skipif( | |
| not matplotlib.testing._check_for_pgf('pdflatex'), | |
| reason='pdflatex + pgf is required') | |
| needs_pgf_xelatex = pytest.mark.skipif( | |
| not matplotlib.testing._check_for_pgf('xelatex'), | |
| reason='xelatex + pgf is required') | |
| needs_usetex = pytest.mark.skipif( | |
| not _checkdep_usetex(), | |
| reason="This test needs a TeX installation") | |