Skip to content

Instantly share code, notes, and snippets.

@waynew
Created October 12, 2015 16:04
Show Gist options
  • Save waynew/6a3b5dc7be2f42d58548 to your computer and use it in GitHub Desktop.
Save waynew/6a3b5dc7be2f42d58548 to your computer and use it in GitHub Desktop.
import thing
import pytest
import hypothesis.strategies as st
from hypothesis import given
from unittest import mock
@pytest.fixture(scope='module')
def something():
return 42
@given(thing=st.text())
@mock.patch('thing.fnord')
@mock.patch('thing.fizzy')
def test_a_thing(fizzy, fnord, something, thing):
print(fizzy)
print(fnord)
assert False
def fnord(): pass
def fizzy(): pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment