Fix tests

This commit is contained in:
Dave Halter
2019-12-27 13:30:53 +01:00
parent 7715655c96
commit 0931c5492d
2 changed files with 3 additions and 1 deletions

View File

@@ -84,6 +84,8 @@ def _is_a_pytest_param(param_name):
This is a heuristic and will work in most cases.
"""
funcdef = search_ancestor(param_name.tree_name, 'funcdef')
if funcdef is None: # A lambda
return False
decorators = funcdef.get_decorators()
return _is_pytest_func(funcdef.name.value, decorators)