Skip to main content

Level-up your Hypothesis tests with CrossHair.

Project description

hypothesis-crosshair

Downloads

Add the power of solver-based symbolic execution to your Hypothesis tests with CrossHair.

Just

pip install hypothesis-crosshair

and then add a backend="crosshair" setting, like so:

from hypothesis import given, settings, strategies as st

@settings(backend="crosshair")
@given(st.integers())
def test_needs_solver(x):
    assert x != 123456789

Docs hopefully coming soon. In the meantime, start a discussion or file an issue.

FAQ

Can I try using crosshair for ALL my hypothesis tests?

Yes! Create or edit your pytest conftest.py file to register a profile like the following:

from hypothesis import settings

settings.register_profile(
    "crosshair",
    backend="crosshair",
)

And then run pytest using the profile you've defined:

pytest . --hypothesis-profile=crosshair 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypothesis_crosshair-0.0.8.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

hypothesis_crosshair-0.0.8-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file hypothesis_crosshair-0.0.8.tar.gz.

File metadata

  • Download URL: hypothesis_crosshair-0.0.8.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for hypothesis_crosshair-0.0.8.tar.gz
Algorithm Hash digest
SHA256 0ce990cf00d2080f036ac000dda6bbf6e974430b11cc6d5dfda74ef91e417345
MD5 1fcc15a1e33b9228bf208377e756483f
BLAKE2b-256 d5ecf4f847c1fe8c5d863cb5a346c1f55f977f869f47ef2a9a45ac626b9d4cd3

See more details on using hashes here.

File details

Details for the file hypothesis_crosshair-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for hypothesis_crosshair-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 71a54497ca1727a13f6e17f90b227eb1a852804a9bb740c237e653d9d3cd3dec
MD5 71f7b6575b99c20d08780e40484ffc05
BLAKE2b-256 ab7fbdf59bde7fef83864cdd9e5de9408993c996537bda9397c3ed0b26c6099a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page