Skip to content

Instantly share code, notes, and snippets.

@maiksprenger
Created February 3, 2017 15:01
Show Gist options
  • Save maiksprenger/ec149785ccd470fedeb443d44bb7c3f0 to your computer and use it in GitHub Desktop.
Save maiksprenger/ec149785ccd470fedeb443d44bb7c3f0 to your computer and use it in GitHub Desktop.
from unittest import TestCase
from hypothesis import given
from hypothesis import strategies
class TestFoo(TestCase):
def setUp(self):
self.foo = 'meow'
@given(strategies.none())
def test_with_hypo(self, nada):
assert self.foo == 'meow'
self.foo = 'kitten'
def test_no_hypo(self):
assert self.foo == 'meow'
self.foo = 'kitten'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment