Created
November 30, 2017 20:36
-
-
Save rhizoome/22634f259f4d6cda669e2dba51390f6b to your computer and use it in GitHub Desktop.
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
import pytest | |
from hypothesis import given | |
from hypothesis.strategies import text, lists | |
def func(x): | |
print(x) | |
class TestPerson(): | |
@pytest.fixture(autouse=True) | |
def setup_testdata(self): | |
print("bla") | |
@given(lists(text())) | |
def test_test(self, mocker, list_): | |
mock_func = mocker.patch('bla.test_test.func') | |
func(list_) | |
assert mock_func.call_count == 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment