相关疑难解决方法(0)

我可以通过pytest测试运行line_profiler吗?

我已经确定了一些长期运行的pytest测试

py.test --durations=10
Run Code Online (Sandbox Code Playgroud)

我想用line_profiler或cprofile之类的东西来测试其中一个测试.我真的想从测试本身获取配置文件数据,因为pytest设置或拆除很可能是慢速的一部分.

但是考虑到line_profiler或cprofile通常是如何涉及的,我不清楚如何使它们与pytest一起工作.

python cprofile pytest

24
推荐指数
3
解决办法
5590
查看次数

标签 统计

cprofile ×1

pytest ×1

python ×1