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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hypothesis_crosshair-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 638b63edc7f5541ddbc79be73cc049fa688c60577df11ca786629966aa758996
MD5 0e6120f343a956e73245c77eadb2badb
BLAKE2b-256 8680bdaeea9bc620ab3c5db1ba800c319c09314af36556064c4dd9ff72a94121

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hypothesis_crosshair-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4c3eafd5d8d68e6bd06f368360f43f7368020be9200fa1651c428ceb79819b8e
MD5 6014f5fe532fe0bf49528a1b182eba4a
BLAKE2b-256 035d629f9823d3f756697a7286aa00493f38ace0f9730a4ea344eb62b2435d75

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