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
It isn't, but the UUID strategy isn't terribly complicated, and nor is the standard library code for generating uuid4s so it shouldn't be too hard to roll your own. Something like the following should work (I've not tested it though):
import hypothesis.strategies as st
@st.composite
def uuid4s(draw):
rng = draw(st.shared(st.randoms(), key='hypothesis.strategies.uuids.generator'))
return UUID(int=rng.getrandbits(128), version=4)
A pull request adding UUID version support to hypothesis.strategies would be gratefully accepted if you wanted to make one. :-)
Is it possible to define uuids() so that it only generates uuid4() ?
Since I'm testing some other stuff, I'd like to have the generators only to create uuid4s.
The text was updated successfully, but these errors were encountered: