我已经确定了一些长期运行的pytest测试
py.test --durations=10
我想用line_profiler或cprofile之类的东西来测试其中一个测试.我真的想从测试本身获取配置文件数据,因为pytest设置或拆除很可能是慢速的一部分.
但是考虑到line_profiler或cprofile通常是如何涉及的,我不清楚如何使它们与pytest一起工作.
python cprofile pytest
cprofile ×1
pytest ×1
python ×1