Test collection¶
HypoFuzz uses pytest to collect the test functions to fuzz, with almost identical command-line interfaces. If you’re using pytest ...
to run your tests, hypothesis fuzz -- ...
will fuzz them.
This also means you can use the standard pytest -k
selector to configure which tests to run, with hypothesis fuzz -- -k ...
. See pytest’s docs on Specifying which tests to run and Conventions for Python test discovery for more details.
Note that tests which use pytest fixtures are not collected, as they may behave differently outside of the pytest runtime. We recommend using a context manager and the with
statement instead. Support for pytest fixtures is on our roadmap.
Support for other test runners, such as unittest
, is on our roadmap.