diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 907fe27..b0254f1 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -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 diff --git a/poetry.lock b/poetry.lock index 77af07b..2752113 100644 --- a/poetry.lock +++ b/poetry.lock @@ -331,18 +331,18 @@ zoneinfo = ["backports.zoneinfo (>=0.2.1)", "tzdata (>=2024.2)"] [[package]] name = "hypothesmith" -version = "0.2.3" +version = "0.3.3" description = "Hypothesis strategies for generating Python programs, something like CSmith" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "hypothesmith-0.2.3-py3-none-any.whl", hash = "sha256:e84890e044dfa3e8e14d3368ca7463d33dcfc75737544b2b0aeac8de4a24a3c7"}, - {file = "hypothesmith-0.2.3.tar.gz", hash = "sha256:bdce845ec984e6e3fed21e65d2e82b8ebc6de5ca5eb93649dfd76034c5906a46"}, + {file = "hypothesmith-0.3.3-py3-none-any.whl", hash = "sha256:fdb0172f9de97d09450da40da7da083fdd118bcd2f88b1a2289413d2d496b1b1"}, + {file = "hypothesmith-0.3.3.tar.gz", hash = "sha256:96c14802d6c8e85d8975264176878db54b28d2ed921fdbfedc2e6b8ce3c81716"}, ] [package.dependencies] -hypothesis = {version = ">=6.58.1", extras = ["lark"]} -libcst = ">=0.4.0" +hypothesis = {version = ">=6.93.0", extras = ["lark"]} +libcst = ">=1.0.1" [[package]] name = "identify" @@ -998,4 +998,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.8, <4" -content-hash = "699b1453646be727dc197ff1048384bc415b0ff9dfbf17c82cd80cd9e8411223" +content-hash = "b372902652026ceeaa88bf16de2f9cf573e6bc1d33427a37ba7775cf07e5da7e" diff --git a/pyproject.toml b/pyproject.toml index 5ef67f1..b5ac780 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/tests/fuzz.py b/tests/fuzz.py index 7cd5195..c12705c 100644 --- a/tests/fuzz.py +++ b/tests/fuzz.py @@ -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