Skip to content

Instantly share code, notes, and snippets.

@tybug
Created February 3, 2024 23:11
Show Gist options
  • Save tybug/de6eaab5b78ed1a95dd6539331636ffb to your computer and use it in GitHub Desktop.
Save tybug/de6eaab5b78ed1a95dd6539331636ffb to your computer and use it in GitHub Desktop.
@given(st.data())
def test(d):
try:
d.draw(st.lists(st.integers(), min_size=3, unique=True))
finally:
raise ValueError
for i in range(10_000):
print(i)
try:
test()
except ValueError as err:
assert "[0, 1, -1]" in "\n".join(err.__notes__)
else:
assert False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment