Level-up your Hypothesis tests with CrossHair.
Project description
hypothesis-crosshair
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for hypothesis_crosshair-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7493cd9e38bd0a28448daf042060dcd10ccabdf62ecce6adb39d896d7fda44ea |
|
MD5 | 9725a74cc0f9f043f8d8dcf28dae630a |
|
BLAKE2b-256 | 837583107b752f75350c8b1bdeb5377e1348e4ee4fd50fd780388ad93114f29a |
Close
Hashes for hypothesis_crosshair-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e854540fe7fb914c63098c3fe35b073b24249ef89f3d3026bc9a6db9f0affc7a |
|
MD5 | c857a71b28ead554af72946f08aff32d |
|
BLAKE2b-256 | 38d34ebe57a62c7dda64e0c5516ca2d9ff65ca0cf7ca521636b4332fa78a19e1 |