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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec0494c5f29543ead26703dd9c252a66a7148d78ddda0d05aa48b1f733e6987 |
|
MD5 | 5c22dbb7214f202a5111e1b4bbc948a1 |
|
BLAKE2b-256 | 5e9df99d85a13678d96876c5dc98f3f6a9615ca5da740a044f7f3d642ab05119 |
Close
Hashes for hypothesis_crosshair-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b3071f00f531abd44b72839b14ee542d0da58afc2f3c2c7922fd698d5c0272 |
|
MD5 | 3a2896224cdab523adbf5eb965b6c43b |
|
BLAKE2b-256 | 8dc8d905c48933be3bc23a5c270fbb85572ab60b58e0e77e88a7924204c38ef4 |