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

【问题】使用python命令运行一个接口脚本时,为什么每个test方法运行前都会把start运行一遍 #222

Closed
xiaoli1232001 opened this issue May 20, 2024 · 1 comment

Comments

@xiaoli1232001
Copy link

我在一个test_xx.py文件中编写接口脚本时,脚本文件里面第1个是start方法,后面有3个test方法,为什么每次用python命令运行此脚本时,每个test方法运行前都会把start运行一遍?是有bug 还是本来就这样。我希望start方法只执行一遍,请问如何解决
Uploading 2024-05-20 16 09 51.png…

@defnngj
Copy link
Collaborator

defnngj commented May 20, 2024

不是bug,start() 是 seldom 的 fixture 方法:https://seldomqa.github.io/getting-started/advanced.html#fixture

@defnngj defnngj closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants