Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果测试用例,添加了自定义得装饰器,测试报告里面对应的用例,不会显示用例描述 #47

Open
270466585 opened this issue Jun 5, 2020 · 2 comments

Comments

@270466585
Copy link

@autophyte @TesterlifeRaymond @steinvenic @gcanoxl

@a572427647
Copy link

同样的问题

@TesterlifeRaymond
Copy link
Owner

这应该是装饰器没有继承元信息导致的, 可以通过@functools.wraps(f)解决此问题

from functools import wraps

def xxx(f):
@wraps(f)
def wrapper(*args,**kwargs):
....
return f(*args,**kwargs)
return wrapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants