Merge pull request #3459 from RonnyPfannschmidt/mark-iter-name-filter

introduce name filtering for marker iteration again
This commit is contained in:
Bruno Oliveira
2018-05-21 13:24:39 -03:00
committed by GitHub
12 changed files with 134 additions and 44 deletions

View File

@@ -118,9 +118,8 @@ def pytest_generate_tests(metafunc):
if hasattr(metafunc.function, attr):
msg = "{0} has '{1}', spelling should be 'parametrize'"
raise MarkerError(msg.format(metafunc.function.__name__, attr))
for marker in metafunc.definition.iter_markers():
if marker.name == 'parametrize':
metafunc.parametrize(*marker.args, **marker.kwargs)
for marker in metafunc.definition.iter_markers(name='parametrize'):
metafunc.parametrize(*marker.args, **marker.kwargs)
def pytest_configure(config):