forked from aeon-toolkit/aeon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
32 lines (25 loc) · 1.02 KB
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""Main configuration file for pytest.
Contents:
Adds a --prtesting option to pytest.
This allows for smaller parameter matrices to be used for certain tests and enables
sub-sampling in the tests (for shorter runtime) ensuring that each estimators full
tests are run on each operating system at least once, and on each python version at
least once, but not necessarily on each operating system / python version combination.
"""
__maintainer__ = []
from aeon.testing import test_config
def pytest_addoption(parser):
"""Pytest command line parser options adder."""
parser.addoption(
"--prtesting",
default=False,
help=(
"Toggle for PR test configuration. Uses smaller parameter matrices for "
"test generation and sub-samples estimators in tests by workflow os/py "
"version."
),
)
def pytest_configure(config):
"""Pytest configuration preamble."""
if config.getoption("--prtesting") in [True, "True", "true"]:
test_config.PR_TESTING = True