2021-12-27 08:29:09 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2022-08-11 07:35:39 +00:00
|
|
|
import pytest
|
|
|
|
|
2018-06-17 11:32:48 +00:00
|
|
|
from hypothesis import HealthCheck, settings
|
|
|
|
|
2022-08-05 07:48:00 +00:00
|
|
|
from attr._compat import PY310
|
2021-05-18 09:28:21 +00:00
|
|
|
|
2018-06-17 11:32:48 +00:00
|
|
|
|
2022-08-11 07:35:39 +00:00
|
|
|
@pytest.fixture(name="slots", params=(True, False))
|
|
|
|
def _slots(request):
|
|
|
|
return request.param
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(name="frozen", params=(True, False))
|
|
|
|
def _frozen(request):
|
|
|
|
return request.param
|
|
|
|
|
|
|
|
|
2018-06-17 11:32:48 +00:00
|
|
|
def pytest_configure(config):
|
|
|
|
# HealthCheck.too_slow causes more trouble than good -- especially in CIs.
|
|
|
|
settings.register_profile(
|
|
|
|
"patience", settings(suppress_health_check=[HealthCheck.too_slow])
|
|
|
|
)
|
|
|
|
settings.load_profile("patience")
|
|
|
|
|
2015-02-09 12:16:56 +00:00
|
|
|
|
2017-09-17 14:22:49 +00:00
|
|
|
collect_ignore = []
|
2021-05-18 09:28:21 +00:00
|
|
|
if not PY310:
|
2021-05-18 05:02:06 +00:00
|
|
|
collect_ignore.extend(["tests/test_pattern_matching.py"])
|