{"id":13772204,"url":"https://github.com/pschanely/hypothesis-crosshair","last_synced_at":"2025-07-23T23:36:18.278Z","repository":{"id":210474233,"uuid":"726496601","full_name":"pschanely/hypothesis-crosshair","owner":"pschanely","description":"Level-up your Hypothesis tests with CrossHair","archived":false,"fork":false,"pushed_at":"2025-04-10T22:05:35.000Z","size":141,"stargazers_count":10,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T02:08:15.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pschanely.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T15:10:09.000Z","updated_at":"2025-04-10T22:05:39.000Z","dependencies_parsed_at":"2023-12-20T15:14:46.732Z","dependency_job_id":"fa759cb2-4742-43f5-930e-a7068eb66a7e","html_url":"https://github.com/pschanely/hypothesis-crosshair","commit_stats":null,"previous_names":["pschanely/hypothesis-crosshair"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschanely%2Fhypothesis-crosshair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschanely%2Fhypothesis-crosshair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschanely%2Fhypothesis-crosshair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschanely%2Fhypothesis-crosshair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pschanely","download_url":"https://codeload.github.com/pschanely/hypothesis-crosshair/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328163,"owners_count":21085261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:01:01.292Z","updated_at":"2025-07-23T23:36:18.253Z","avatar_url":"https://github.com/pschanely.png","language":"Python","funding_links":[],"categories":["Python","Property Based Testing"],"sub_categories":[],"readme":"# hypothesis-crosshair\n\n[![Downloads](https://pepy.tech/badge/hypothesis-crosshair)](https://pepy.tech/project/hypothesis-crosshair)\n\n\nAdd the power of solver-based symbolic execution to your\n[Hypothesis](https://hypothesis.readthedocs.io/en/latest/index.html)\ntests with\n[CrossHair](https://github.com/pschanely/CrossHair).\n\nJust \n```\npip install hypothesis-crosshair\n```\n\nand then add a backend=\"crosshair\" setting, like so:\n\n```\nfrom hypothesis import given, settings, strategies as st\n\n@settings(backend=\"crosshair\")\n@given(st.integers())\ndef test_needs_solver(x):\n    assert x != 123456789\n```\n\n\nDocs hopefully coming soon. In the meantime, start a\n[discussion](https://github.com/pschanely/hypothesis-crosshair/discussions)\nor file an [issue](https://github.com/pschanely/hypothesis-crosshair/issues).\n\n\n## FAQ\n\n### Can I try using crosshair for ALL my hypothesis tests?\n\nYes! Create or edit your pytest\n[conftest.py](https://docs.pytest.org/en/7.1.x/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files)\nfile to register a profile like the following:\n\n```\nfrom hypothesis import settings\n\nsettings.register_profile(\n    \"crosshair\",\n    backend=\"crosshair\",\n)\n```\n\nAnd then run pytest using the profile you've defined:\n```\npytest . --hypothesis-profile=crosshair \n```\n\n\n## Changelog\n\n### Next Version\n* Nothing yet\n\n### 0.0.24\n* Do not attempt to capture and retry hypothesis internal exceptions.\n  (fixes [#34](https://github.com/pschanely/hypothesis-crosshair/issues/34))\n\n### 0.0.23\n* Prevent an incorrect verified claim under SMT-heavy analysis.\n  (fixes [pschanely/CrossHair#354](https://github.com/pschanely/CrossHair/issues/354))\n\n### 0.0.22\n* Abort concrete executions with invalid draws.\n  (fixes [#29](https://github.com/pschanely/hypothesis-crosshair/issues/29))\n* Adjust how the preventative measures in v0.0.21 work for recursive datastructures.\n\n### 0.0.21\n* Avoid occasional unexpected errors when stopping a test run with Ctrl-C.\n* Prevent over-expansion when generating recursive datastructures. (fixes [#27](https://github.com/pschanely/hypothesis-crosshair/issues/27))\n\n### 0.0.20\n* Avoid potential import warning when registering ourself with hypothesis.\n* Skip constraint checking when performing a concrete re-execution.\n\n### 0.0.19\n* Limit the re-thow behavior in 0.0.17 to Unsatisfiable errors exclusively\n* Change default path timeout to 2.5 seconds\n* Prevent false positives by ensuring user exceptions are only exposed under concrete executions.\n\n### 0.0.18\n* Ensure drawn floats respect hypothesis signed-zero semantics for min_value/max_value.\n\n### 0.0.17\n* Do not interpret Unsatisfiable errors as user exceptions; just re-throw, so that hypothesis can act appropriately.\n* Report CrossHair path abortions to hypothesis as `discard_test_case` instead of `verified`.\n  This lets Hypothesis report unsatisfiable strategies correctly when run under crosshair.\n\n### 0.0.16\n* Integrate hypothesis's new BackCannotProceed exception, which will reduce the likelihood of FlakeyReplay errors.\n* Validate suspected counterexamples with concrete executions.\n* Treat nondeterminism as an unexplored path rather than a user error. (though we might change this back later)\n* Ensure realization logic called by hypothesis cannot grow the path tree.\n* Allow for collapsing more SMT expressions when drawing strings and floats.\n\n### 0.0.15\n* (was never released)\n\n### 0.0.14\n* Support the revised hypothesis provider draw interfaces as of hypothesis `v6.112.0`.\n\n### 0.0.13\n* Integrate with the hypothesis [observability system](https://hypothesis.readthedocs.io/en/latest/observability.html).\n\n### 0.0.12\n* Error early when trying to nest hypothesis tests. (which will otherwise put CrossHair into a bad state)\n\n### 0.0.11\n* Address errors when the solver can't keep up (fixes [#20](https://github.com/pschanely/hypothesis-crosshair/issues/20))\n\n### 0.0.10\n* Reduce the numebr of iterations required to generate valid datetimes\n\n### 0.0.9\n* Quietly ignore iterations that appear to be failing due to symbolic intolerance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschanely%2Fhypothesis-crosshair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpschanely%2Fhypothesis-crosshair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschanely%2Fhypothesis-crosshair/lists"}