make loop more readable
--HG-- branch : parametrized-fixture-override
This commit is contained in:
parent
d1005ebb8f
commit
33c2a3a3e5
2
Makefile
2
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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue