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

Uploaded Source

Built Distribution

hypothesis_crosshair-0.0.9-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypothesis_crosshair-0.0.9.tar.gz
  • Upload date:
  • Size: 7.5 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.9.tar.gz
Algorithm Hash digest
SHA256 7493cd9e38bd0a28448daf042060dcd10ccabdf62ecce6adb39d896d7fda44ea
MD5 9725a74cc0f9f043f8d8dcf28dae630a
BLAKE2b-256 837583107b752f75350c8b1bdeb5377e1348e4ee4fd50fd780388ad93114f29a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hypothesis_crosshair-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e854540fe7fb914c63098c3fe35b073b24249ef89f3d3026bc9a6db9f0affc7a
MD5 c857a71b28ead554af72946f08aff32d
BLAKE2b-256 38d34ebe57a62c7dda64e0c5516ca2d9ff65ca0cf7ca521636b4332fa78a19e1

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