Created
November 21, 2013 11:22
-
-
Save psav/7579967 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
@pytest.fixture(params=['a', 'b']) | |
def do_something(request): | |
print request.param | |
@pytest.usefixtures(do_something, params=['c']) | |
def do_something_with_something_else(): | |
'''Like to pass a custom setof params to the fixture''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as a kind of hack you could do something like this i guess:
@pytest.fixture(params=["a", "b"])
def do_something(request):
...
@pytest.fixture(params=["c"])
def do_otherthing(request):
return do_something(request)
@pytest.usefixtures("do_otherthing")
def test_some():
pass