Skip to content

Commit

Permalink
add dependent draw test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Jul 4, 2024
1 parent 3d4fc6f commit 6196973
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hypothesis-python/tests/conjecture/test_alt_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,16 @@ def test_function(n):
test_function()

assert all(n == 42 for n in values)


def test_realize_dependent_draw():
with temp_register_backend("realize", RealizeProvider):

@given(st.data())
@settings(backend="realize")
def test_function(data):
n1 = data.draw(st.integers())
n2 = data.draw(st.integers(n1, n1 + 10))
assert n1 <= n2

test_function()

0 comments on commit 6196973

Please sign in to comment.