Last active
August 29, 2015 14:00
-
-
Save public/e671a53b70fbb6fb6129 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 | |
def pytest_generate_tests(metafunc): | |
if "fixA" in metafunc.fixturenames: | |
metafunc.parametrize("fixA", []) | |
def test_fixA(fixA): | |
print fixA | |
@pytest.mark.parametrize(["fixB"], []) | |
def test_fixB(fixB): | |
print fixB | |
@pytest.mark.parametrize(["fixB"], []) | |
def test_fixA_fixB(fixA, fixB): | |
print fixA, fixB | |
@pytest.mark.parametrize(["fixB"], [(1,)]) | |
def test_fixA_fixB_bad(fixA, fixB): | |
print fixA, fixB | |
@pytest.mark.parametrize(["fixP"], [(1,)]) | |
@pytest.mark.parametrize(["fixQ"], []) | |
def test_fixA_fixB_bad2(fixP, fixQ): | |
print fixP, fixQ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment