Skip to content

Instantly share code, notes, and snippets.

@drj11
Created December 21, 2016 16:51
Show Gist options
  • Save drj11/fd38d430e521dd747161973fb6c25334 to your computer and use it in GitHub Desktop.
Save drj11/fd38d430e521dd747161973fb6c25334 to your computer and use it in GitHub Desktop.
My buggy hypothesis example
from hypothesis import given
from hypothesis.strategies import floats
@given(floats())
def test_divide(p, q):
if q == 0: return
assert p / q == p * (1 / q)
if __name__ == '__main__':
test_divide()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment