python - Pytest stop_test_suite_after_n_test_failures - 显示错误
问题描述
我计划在遇到 n 次失败后停止在 PyTest 中的执行。
所以我使用了以下命令:
pytest 文件名.py -v --maxfail = 1
但它显示以下错误,无法找到解决方案。请放一些光。
错误:用法:pytest [options] [file_or_dir] [file_or_dir] [...] pytest:错误:参数 --maxfail:无效的 int 值:'=1'
解决方案
pytest 文件名.py -v --maxfail=1
删除了 = 附近的空格(等于符号),它就像一个魅力。
推荐阅读
- levelplot - 在某个 Lat Long 的水平图中写入文本
- angular - updateValueAndValidity 不适用于特定的 formControl
- azure - 不断地将来自 Rest API 的数据摄取到 Azure 事件中心
- android - 如何摆脱 Android 可绘制对象中图层列表项之间的模糊边缘
- python - 如何在内部循环中将元组添加在一起?
- ocelot - 无法合并 Ocelot 配置文件
- amazon-web-services - 使用火花而不是使用动态框架(胶水上下文)从胶水目录中读取
- html - jQuery 函数切换
- reactjs - Jest 在 React 测试中遇到了一个意外的标记
- laravel - 如何优化循环,使用流明从另一个 API 获取数据