-
-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathconftest.py
More file actions
39 lines (27 loc) · 1.06 KB
/
conftest.py
File metadata and controls
39 lines (27 loc) · 1.06 KB
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
33
34
35
36
37
38
39
import platform
import sys
from os import environ
import pytest
from hypothesis import HealthCheck, settings
from cattrs import BaseConverter, Converter
@pytest.fixture(params=(True, False))
def genconverter(request):
return Converter(detailed_validation=request.param)
@pytest.fixture(params=(True, False))
def converter(request, converter_cls):
return converter_cls(detailed_validation=request.param)
@pytest.fixture(params=(BaseConverter, Converter), scope="session")
def converter_cls(request):
return request.param
settings.register_profile(
"tests", suppress_health_check=(HealthCheck.too_slow,), deadline=None
)
settings.register_profile("fast", settings.get_profile("tests"), max_examples=10)
settings.load_profile("fast" if environ.get("FAST") == "1" else "tests")
collect_ignore_glob = []
if sys.version_info < (3, 14):
collect_ignore_glob.append("test_gen_dict_649.py")
if sys.version_info < (3, 12):
collect_ignore_glob.append("*_695.py")
if platform.python_implementation() == "PyPy":
collect_ignore_glob.append("*_cpython.py")