diff --git a/Makefile b/Makefile index 50772f4fd..7875083cf 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ PYTHON = python2.7 # install all needed for development develop: .env - .env/bin/pip install -e .[test] tox + .env/bin/pip install -e . tox # clean the development envrironment clean: diff --git a/_pytest/python.py b/_pytest/python.py index e834b81b4..61e0d1534 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1712,9 +1712,8 @@ class FixtureManager: def pytest_generate_tests(self, metafunc): for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) - if faclist is None: - continue # will raise FixtureLookupError at setup time - for fixturedef in faclist[-1:]: + if faclist: + fixturedef = faclist[-1] if fixturedef.params is not None: func_params = getattr(getattr(metafunc.function, 'parametrize', None), 'args', [[None]]) # skip directly parametrized arguments @@ -1722,6 +1721,8 @@ class FixtureManager: metafunc.parametrize(argname, fixturedef.params, indirect=True, scope=fixturedef.scope, ids=fixturedef.ids) + else: + continue # will raise FixtureLookupError at setup time def pytest_collection_modifyitems(self, items): # separate parametrized setups diff --git a/tox.ini b/tox.ini index 232ac951e..827125dfb 100644 --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ commands= minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX +addopts= -rxsX -vl rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance