forked from sktime/sktime
-
Notifications
You must be signed in to change notification settings - Fork 1
/
conftest.py
31 lines (24 loc) · 1.06 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
# -*- coding: utf-8 -*-
"""Main configuration file for pytest.
Contents:
adds a --matrixdesign option to pytest
this allows to turn on/off the sub-sampling in the tests (for shorter runtime)
"on" condition is partition/block design to ensure each estimator 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
by default, this is off, including for default local runs of pytest
"""
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["fkiraly"]
from sktime.tests import test_all_estimators
def pytest_addoption(parser):
"""Pytest command line parser options adder."""
parser.addoption(
"--matrixdesign",
default=False,
help="sub-sample estimators in tests by os/version matrix partition design",
)
def pytest_configure(config):
"""Pytest configuration preamble."""
if config.getoption("--matrixdesign") in [True, "True"]:
test_all_estimators.MATRIXDESIGN = True