merge with upstream

--HG--
branch : parametrized-fixture-override
This commit is contained in:
Anatoly Bubenkov 2015-03-02 20:18:31 +01:00
commit 16bcfa749e
3 changed files with 6 additions and 5 deletions

View File

@ -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:

View File

@ -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

View File

@ -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