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
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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 638b63edc7f5541ddbc79be73cc049fa688c60577df11ca786629966aa758996 |
|
MD5 | 0e6120f343a956e73245c77eadb2badb |
|
BLAKE2b-256 | 8680bdaeea9bc620ab3c5db1ba800c319c09314af36556064c4dd9ff72a94121 |
Close
Hashes for hypothesis_crosshair-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c3eafd5d8d68e6bd06f368360f43f7368020be9200fa1651c428ceb79819b8e |
|
MD5 | 6014f5fe532fe0bf49528a1b182eba4a |
|
BLAKE2b-256 | 035d629f9823d3f756697a7286aa00493f38ace0f9730a4ea344eb62b2435d75 |