3 ms·
By default, the biggest value from this is catching unexpected runtime exceptions with certain values (the edge cases you don't think of yourself). To get the m
by timothycrosley 7y ago
By default, the biggest value from this is catching unexpected runtime exceptions with certain values (the edge cases you don't think of yourself). To get the most value out of it, you can further specify what you expect from the result using the _auto_verify=Callable() parameter, or by looking at the individual test cases.
Simple example:
from my_library import add
from hypothesis_auto import auto_pytest
@auto_pytest()
def test_add(test_case):
add_result = test_case()
if test_case.params.kwargs['number_1'] > 0 and test_case.params.kwargs['number_1']:
assert add_result > test_case.params.kwargs['number_1']
assert add_result > test_case.params.kwargs['number_1']
- ebg13 7y ago> By default, the biggest value from this is catching unexpected runtime exceptions with certain values (the edge cases you don't think of yourself). So it's a fuzzer?
- timothycrosley 7y agoYes! A smart one though, that limits itself to the type constraints you've specified to avoid redoing the work of your type checker.