check step type first, it's less expensive

This commit is contained in:
Alessio Bogon 2022-07-15 18:02:46 +02:00
parent 5c02da2ae7
commit 143dabc71d
1 changed files with 4 additions and 2 deletions

View File

@ -44,11 +44,13 @@ def find_argumented_step_function(name: str, type_: str, fixturemanager: Fixture
if step_func_context is None:
continue
if step_func_context.type != type_:
continue
match = step_func_context.parser.is_matching(name)
if not match:
continue
if step_func_context.type != type_:
continue
return step_func_context
return None