Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def allure_report(result_dir="allure_results"):
allure_hooks = AllureHooks(result_dir)
frame = inspect.currentframe()
try:
for hook_name in HOOKS:
if hook_name in frame.f_back.f_locals:
frame.f_back.f_locals[hook_name] = wrapper(frame.f_back.f_locals[hook_name],
getattr(allure_hooks, hook_name))
else:
frame.f_back.f_locals[hook_name] = getattr(allure_hooks, hook_name)
finally:
del frame