You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nesting @given() inside @given() might seem reasonable at first glance - but there are major problems, and it doesn't actually give you any more power than using st.data() instead of an inner function. Those downsides include quadratic cost of generating examples, and considerably worse when shrinking; and outright incompatibility with some alternative backends.
So let's detect this, emit a deprecation warning - which can explain how and why to use st.data() instead - and then we'll turn that into an error in the next major version.
The text was updated successfully, but these errors were encountered:
Nesting
@given()
inside@given()
might seem reasonable at first glance - but there are major problems, and it doesn't actually give you any more power than usingst.data()
instead of an inner function. Those downsides include quadratic cost of generating examples, and considerably worse when shrinking; and outright incompatibility with some alternative backends.@tybug checked a github dataset, and there are only five cases across thousands of repos: one in each of ArielHorwitz/botroyale, chardet/chardet, and cgarciae/pypeln, and vyperlang/vyper has these two.
So let's detect this, emit a deprecation warning - which can explain how and why to use
st.data()
instead - and then we'll turn that into an error in the next major version.The text was updated successfully, but these errors were encountered: