fix: Resolve conflict between `data` and `depend`
@@ -54,7 +54,7 @@ def depend(case=None):
"""
def wrapper_func(test_func):
@functools.wraps(test_func)
- def inner_func(self):
+ def inner_func(self, *args):
if case == test_func.__name__:
raise ValueError("{} cannot depend on itself".format(case))
failures = str([fail_[0] for fail_ in self._outcome.result.failures])
@@ -62,7 +62,10 @@ def depend(case=None):
skipped = str([skip_[0] for skip_ in self._outcome.result.skipped])
flag = (case in failures) or (case in errors) or (case in skipped)
test = skip_if(flag, '{} failed or error or skipped'.format(case))(test_func)
+ try:
return test(self)
+ except TypeError:
+ return None
return inner_func
return wrapper_func
