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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | efbbed29df6bd2a19a92bd18d08cd58dbaec795b2785284d6575f14718f7f3cc |
|
MD5 | ca1b87e6b6e1422bc1604c5973620e58 |
|
BLAKE2b-256 | 543df927aa67ff1abb513452671a9e54b17048c56a234c302c49f51c331fb0b4 |
Close
Hashes for hypothesis_crosshair-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6094c4563cb19ddc08437504a2103a5d3a03de214cd958a3c00d46005e9dfcd5 |
|
MD5 | 824834c4121fc1c1f56ed06248e1ba23 |
|
BLAKE2b-256 | 621fc1217886e34202fe870d12c83b07dbc804721a0b3c8a748a86ff8a726624 |