Open
Description
def stfunc_both():
return [st.integers(), st.integers()]
@given(*stfunc_both())
def test_add(a, b):
assert add(a, b) == a + b
As shown above, hypothesis
works by using @given
to generate data and also pass in the data by adding parameters to the test case. For now, user can manually type in the parameters in test case, however, we could also do something so that it could be automatically added there. This can be related to the plugin.