File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66
77def pytest_configure (config ):
8+ # config is initialized here rather than in pytest.ini so that `pytest
9+ # --pyargs matplotlib` (which would not find pytest.ini) works. The only
10+ # entries in pytest.ini set minversion (which is checked earlier) and
11+ # testpaths/python_files, as they are required to properly find the tests.
12+ for key , value in [
13+ ("markers" , "flaky: (Provided by pytest-rerunfailures.)" ),
14+ ("markers" , "timeout: (Provided by pytest-timeout.)" ),
15+ ("markers" , "backend: Set alternate Matplotlib backend temporarily." ),
16+ ("markers" , "style: Set alternate Matplotlib style temporarily." ),
17+ ("markers" , "baseline_images: Compare output against references." ),
18+ ("markers" , "pytz: Tests that require pytz to be installed." ),
19+ ("filterwarnings" , "error" ),
20+ ]:
21+ config .addinivalue_line (key , value )
22+
823 matplotlib .use ('agg' , force = True )
924 matplotlib ._called_from_pytest = True
1025 matplotlib ._init_tests ()
Original file line number Diff line number Diff line change 1+ # Additional configuration is in matplotlib/testing/conftest.py.
12[pytest]
23minversion = 3.6
34
45testpaths = lib
56python_files = test_*.py
6-
7- markers =
8- flaky: (Provided by pytest-rerunfailures.)
9- timeout: (Provided by pytest-timeout.)
10- backend: Set alternate Matplotlib backend temporarily.
11- style: Set alternate Matplotlib style temporarily.
12- baseline_images: Compare output against a known reference.
13- pytz: Tests that require pytz to be installed.
14-
15- filterwarnings =
16- error
You can’t perform that action at this time.
0 commit comments