Skip to content

Instantly share code, notes, and snippets.

@jason-curtis
Created January 21, 2020 23:22
Show Gist options
  • Save jason-curtis/f80bbc64132410efa65f86d4509e98ba to your computer and use it in GitHub Desktop.
Save jason-curtis/f80bbc64132410efa65f86d4509e98ba to your computer and use it in GitHub Desktop.
Simple example of how to use hypothesis library
import hypothesis
@hypotheis.given(hypothesis.strategies.text())
def test_my_function_returns_string_input(s):
assert my_function(s) == s
# Tests your “hypothesis” with a whole bunch of different types of garbage.
my_function()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment