| 1 |
import matplotlib |
| 2 |
from matplotlib.testing.conftest import * # noqa |
| 3 |
|
| 4 |
|
| 5 |
def pytest_configure(config): |
| 6 |
# config is initialized here rather than in pytest.ini so that `pytest |
| 7 |
# --pyargs matplotlib` (which would not find pytest.ini) works. The only |
| 8 |
# entries in pytest.ini set minversion (which is checked earlier), |
| 9 |
# testpaths/python_files, as they are required to properly find the tests |
| 10 |
for key, value in [ |
| 11 |
("markers", "flaky: (Provided by pytest-rerunfailures.)"), |
| 12 |
("markers", "timeout: (Provided by pytest-timeout.)"), |
| 13 |
("markers", "backend: Set alternate Matplotlib backend temporarily."), |
| 14 |
("markers", "style: Set alternate Matplotlib style temporarily."), |
| 15 |
("markers", "baseline_images: Compare output against references."), |
| 16 |
("markers", "pytz: Tests that require pytz to be installed."), |
| 17 |
# ("filterwarnings", "error"), |
| 18 |
]: |
| 19 |
config.addinivalue_line(key, value) |
| 20 |
|
| 21 |
matplotlib.use("agg", force=True) |
| 22 |
matplotlib._called_from_pytest = True |
| 23 |
matplotlib._init_tests() |