introduce name filtering for marker iteration again

This commit is contained in:
Ronny Pfannschmidt
2018-05-09 15:40:52 +02:00
parent 35f53a7353
commit 4914135fdf
11 changed files with 67 additions and 33 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):