官术网_书友最值得收藏!

Stop soon: -x, --maxfail

When doing large-scale refactorings, you might not know beforehand how or which tests are going to be affected. In those situations, you might try to guess which modules will be affected and start running tests for those. But, often, you end up breaking more tests than you initially estimated and quickly try to stop the test session by hitting CTRL+C when everything starts to fail unexpectedly. 

In those situations, you might try using the --maxfail=N command-line flag, which stops the test session automatically after N failures or errors, or the shortcut -x, which equals --maxfail=1.

λ pytest tests/core -x

This allows you to quickly see the first failing test and deal with the failure. After fixing the reason for the failure, you can continue running with -x to deal with the next problem.

If you find this brilliant, you don't want to skip the next section!

主站蜘蛛池模板: 平阴县| 且末县| 宁南县| 嵊州市| 旌德县| 翁牛特旗| 探索| 汝州市| 华安县| 漠河县| 馆陶县| 公安县| 黄大仙区| 齐河县| 海盐县| 碌曲县| 济宁市| 乌海市| 夹江县| 明溪县| 永善县| 巴彦县| 类乌齐县| 邵阳市| 无极县| 安庆市| 龙州县| 筠连县| 房产| 榆树市| 新建县| 新余市| 嵊泗县| 贺州市| 阳朔县| 水富县| 合山市| 台北市| 南郑县| 资阳市| 定远县|