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

Uploaded Source

Built Distribution

hypothesis_crosshair-0.0.7-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypothesis_crosshair-0.0.7.tar.gz
  • Upload date:
  • Size: 7.2 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.7.tar.gz
Algorithm Hash digest
SHA256 efbbed29df6bd2a19a92bd18d08cd58dbaec795b2785284d6575f14718f7f3cc
MD5 ca1b87e6b6e1422bc1604c5973620e58
BLAKE2b-256 543df927aa67ff1abb513452671a9e54b17048c56a234c302c49f51c331fb0b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hypothesis_crosshair-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6094c4563cb19ddc08437504a2103a5d3a03de214cd958a3c00d46005e9dfcd5
MD5 824834c4121fc1c1f56ed06248e1ba23
BLAKE2b-256 621fc1217886e34202fe870d12c83b07dbc804721a0b3c8a748a86ff8a726624

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