Created
December 21, 2016 16:51
-
-
Save drj11/fd38d430e521dd747161973fb6c25334 to your computer and use it in GitHub Desktop.
My buggy hypothesis example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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