Skip to content

Commit 2fda65f

Browse files
JonathanPlasseZac-HD
authored andcommitted
Test CrossHair backend in the CI
1 parent 9a8422c commit 2fda65f

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

.github/workflows/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ jobs:
7373
- check-pandas13
7474
- check-pandas12
7575
- check-pandas11
76+
# - check-crosshair-cover
77+
# - check-crosshair-nocover
78+
# - check-crosshair-niche
7679
- check-py38-oldestnumpy
7780
fail-fast: false
7881
steps:

hypothesis-python/tests/common/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def run():
6161

6262
settings.register_profile("debug", settings(verbosity=Verbosity.debug))
6363

64-
settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))
65-
6664
for backend in set(AVAILABLE_PROVIDERS) - {"hypothesis"}:
6765
settings.register_profile(backend, backend=backend) # e.g. "crosshair"
66+
67+
settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))

hypothesis-python/tox.ini

+15
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,21 @@ commands =
103103
python -bb -X dev -m pytest tests/pandas -n auto
104104
# Adding a new pandas? See comment above!
105105

106+
[testenv:crosshair-{cover,nocover,niche,custom}]
107+
deps =
108+
-r../requirements/test.txt
109+
-e .[crosshair]
110+
allowlist_externals =
111+
bash
112+
setenv=
113+
HYPOTHESIS_PROFILE=crosshair
114+
commands =
115+
# invoke with `./build.sh check-crosshair-cover -- -x -Wignore`
116+
cover: python -bb -X dev -m pytest -n auto tests/cover/ tests/pytest/ {posargs}
117+
nocover: python -bb -X dev -m pytest -n auto tests/nocover/ {posargs}
118+
niche: bash scripts/other-tests.sh
119+
custom: python -bb -X dev -m pytest {posargs}
120+
106121
[testenv:django32]
107122
commands =
108123
pip install .[pytz]

tooling/src/hypothesistooling/__main__.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ def tox(*args):
481481
run_tox(*args)
482482

483483

484-
def standard_tox_task(name, *args, py=ci_version):
484+
def standard_tox_task(name, py=ci_version):
485485
TASKS["check-" + name] = python_tests(
486-
lambda: run_tox(name, PYTHONS.get(py, py), *args)
486+
lambda *args: run_tox(name, PYTHONS.get(py, py), *args)
487487
)
488488

489489

@@ -498,6 +498,9 @@ def standard_tox_task(name, *args, py=ci_version):
498498
for n in [11, 12, 13, 14, 15, 20]:
499499
standard_tox_task(f"pandas{n}")
500500

501+
for kind in ("cover", "nocover", "niche"):
502+
standard_tox_task(f"crosshair-{kind}")
503+
501504
standard_tox_task("py38-oldestnumpy", py="3.8")
502505

503506
standard_tox_task("coverage")

0 commit comments

Comments
 (0)