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
taken from hypothesis (emphasis mine)
It works by letting you write tests that assert that something should be true for every case, not just the ones you happen
to think of.
Think of a normal unit test as being something like the following:
Set up some data.
Perform some operations on the data.
Assert something about the result.
Hypothesis lets you write tests which instead look like this:
the text function returns what Hypothesis calls a search strategy. An object with methods that describe how to generate and simplify certain kinds of values.
Falsifying example: test_decode_inverts_encode(s='')
UnboundLocalError: local variable 'character' referenced before assignment
Hypothesis correctly points out that this code is simply wrong if called on an empty string.
great for regression tests because Hypothesis will remember failing examples
The text was updated successfully, but these errors were encountered:
property testing
taken from hypothesis (emphasis mine)
It works by letting you write tests that assert that something should be true for every case, not just the ones you happen
to think of.
Think of a normal unit test as being something like the following:
Hypothesis lets you write tests which instead look like this:
python example:
Hypothesis correctly points out that this code is simply wrong if called on an empty string.
The text was updated successfully, but these errors were encountered: