In my unit tests I use the same combination of strategies fairly often:
import hypothesis.strategies as st
@given(st.text(), st.integers(), st.floats())
def test_stuff(text, integer, float):
...
I was hoping I could extract that combination like so:
def combo():
return st.tuples(st.text(), st.integers(), st.floats())
So that I could use it in this shorter way:
@given(combo())
def test_stuff(text, integer, float):
...
However, then I get fixture 'text' not found
. Is there a way to achieve what I want with Hypothesis?