forked from statsmodels/statsmodels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
21 lines (15 loc) · 790 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pytest
def pytest_addoption(parser):
parser.addoption("--skip-slow", action="store_true",
help="skip slow tests")
parser.addoption("--only-slow", action="store_true",
help="run only slow tests")
parser.addoption("--skip-examples", action="store_true",
help="skip tests of examples")
def pytest_runtest_setup(item):
if 'slow' in item.keywords and item.config.getoption("--skip-slow"):
pytest.skip("skipping due to --skip-slow")
if 'slow' not in item.keywords and item.config.getoption("--only-slow"):
pytest.skip("skipping due to --only-slow")
if 'example' in item.keywords and item.config.getoption("--skip-examples"):
pytest.skip("skipping due to --skip-examples")