I was wondering if it is possible to use given with parameters comes from pytest's parametrize function.
Example:
import pytest
from hypothesis import given
from hypothesis import strategies as st
@st.composite
def my_strategy(draw, attribute):
# Body of my strategy
return # Something...
@pytest.mark.parametrize("attribute", [1, 2, 3])
@given(my_strategy(attribute))
def test_foo(strategy):
pass
On @given(my_strategy(attribute)) I want that attribute will be parametrize's attribute and generate new my_strategy every run with the wanted attribute
How can I do that?