Skip to content

Commit

Permalink
fix: fuzz testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hadialqattan committed Jan 6, 2025
1 parent 47b1e04 commit 1f9b9b2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pytest = "^7.0"
pytest-cov = "^4.0.0"
pytest-randomly = "^3.4.1"
oschmod = "^0.3.9"
hypothesmith = "^0.2.0"
hypothesmith = "^0.3.3"
pre-commit = {version = "^3.0.0", python = ">=3.8"}

[build-system]
Expand Down
4 changes: 2 additions & 2 deletions tests/fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# This test uses the Hypothesis and Hypothesmith libraries to generate random
# syntatically-valid Python source code and run Pycln in odd modes.
@settings(
max_examples=1750, # roughly 1750 tests/minute,
max_examples=1000, # roughly 1750 tests/minute,
derandomize=True, # deterministic mode to avoid CI flakiness
deadline=None, # ignore Hypothesis' health checks; we already know that
suppress_health_check=HealthCheck.all(), # this is slow and filter-heavy.
suppress_health_check=list(HealthCheck), # this is slow and filter-heavy.
)
@given(
# Note that while Hypothesmith might generate code unlike that written by
Expand Down

0 comments on commit 1f9b9b2

Please sign in to comment.