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.5.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

hypothesis_crosshair-0.0.5-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypothesis_crosshair-0.0.5.tar.gz
  • Upload date:
  • Size: 7.0 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.5.tar.gz
Algorithm Hash digest
SHA256 2ec0494c5f29543ead26703dd9c252a66a7148d78ddda0d05aa48b1f733e6987
MD5 5c22dbb7214f202a5111e1b4bbc948a1
BLAKE2b-256 5e9df99d85a13678d96876c5dc98f3f6a9615ca5da740a044f7f3d642ab05119

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hypothesis_crosshair-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 27b3071f00f531abd44b72839b14ee542d0da58afc2f3c2c7922fd698d5c0272
MD5 3a2896224cdab523adbf5eb965b6c43b
BLAKE2b-256 8dc8d905c48933be3bc23a5c270fbb85572ab60b58e0e77e88a7924204c38ef4

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