Tests: Add Hypothesis, with dev, ci and thorough profiles

hypothesis joins the test extra. conftest.py registers three profiles,
chosen with HYPOTHESIS_PROFILE:
- dev (the default): 100 examples.
- ci: 100 examples, derandomized, so a CI failure always reproduces.
- thorough: 3000 examples, for bug hunting.
None of them has a deadline: an example compiles a program twice.

CI runs the suite with the ci profile. The example database
(.hypothesis/) is ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pragyansh Chaturvedi
2026-10-27 21:05:25 +05:30
parent 7e69e7b23e
commit ed5bc46793
4 changed files with 24 additions and 0 deletions

View File

@ -72,6 +72,9 @@ jobs:
run: uv pip install --system -e ".[test]"
- name: Run test suite
env:
# tests/property: derandomized, so a failure always reproduces
HYPOTHESIS_PROFILE: ci
run: make test
- name: Check whether sudo is usable