python-3.x - pytest & pytest-benchmark:串行还是并行?
问题描述
在单个文件中:
test.py
,我有 3 个测试功能:test1()
,test2()
,test3()
.pytest
是并行还是pytest-benchmark
串行运行这 3 个测试用例?我有 3 个文件:
test1.py
,test2.py
,test3.py
. 分别地,我在每个文件中都有一个测试函数:test1()
,test2()
,test3()
. 如果我只是运行pytest
或pytest-benchmark
在它们所在的目录中,这 3 个测试是并行运行还是串行运行?
解决方案
根据Reddit 上crosspost 的回复和上面的评论,
pytest
并pytest-benchmark
始终串行运行。
推荐阅读
- node.js - 异步/等待 graphql 查询或突变
- segue - Swift 4 - 发送电子邮件后转到新的 ViewController
- r - R- 脆弱 Cox 模型的似然函数
- cloudflare - 可以从 cloudflare 工人那里掏钱吗?
- swift - 致命错误:意外发现 nil while
- typescript - 如何对块使用`@ts-ignore`?
- jquery - 下载文档时使用window.location.href时如何操作gif加载?
- database - Yii2上验证用户存在后如何从数据库中显示用户信息
- bash - 是否有可能只在 bash 脚本中之前(或之后)定义 ENV 变量
- python - 在没有上下文信息的情况下从元组访问对象的值