|
a |
|
b/tests/conftest.py |
|
|
1 |
import pytest |
|
|
2 |
|
|
|
3 |
|
|
|
4 |
def pytest_addoption(parser): |
|
|
5 |
parser.addoption( |
|
|
6 |
"--trials", action="store", default=10000, |
|
|
7 |
help="number of trails for random tests" |
|
|
8 |
) |
|
|
9 |
parser.addoption( |
|
|
10 |
"--dataset_samples", action="store", default=10000, |
|
|
11 |
help="number of samples to test from the data sets" |
|
|
12 |
) |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
@pytest.fixture |
|
|
16 |
def trials(request): |
|
|
17 |
return int(request.config.getoption("--trials")) |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
@pytest.fixture |
|
|
21 |
def dataset_samples(request): |
|
|
22 |
return int(request.config.getoption("--dataset_samples")) |