Skip to content

Instantly share code, notes, and snippets.

@joseph-allen
Created December 4, 2017 09:47
Show Gist options
  • Save joseph-allen/36eaf7533af52f6cbdc22af13897b0d9 to your computer and use it in GitHub Desktop.
Save joseph-allen/36eaf7533af52f6cbdc22af13897b0d9 to your computer and use it in GitHub Desktop.
@pytest.fixture(params=[('input', 'expected')])
def get_input(request):
return request.param
@pytest.fixture
def get_function_result(get_input):
return test_function(get_input[0])
def test_function(get_input, get_function_result):
assert get_function_result == get_input[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment