File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
Original file line number Diff line number Diff line change 5
5
6
6
7
7
def 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
+
8
23
matplotlib .use ('agg' , force = True )
9
24
matplotlib ._called_from_pytest = True
10
25
matplotlib ._init_tests ()
Original file line number Diff line number Diff line change
1
+ # Additional configuration is in matplotlib/testing/conftest.py.
1
2
[pytest]
2
3
minversion = 3.6
3
4
4
5
testpaths = lib
5
6
python_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