擅长:python、mysql、java
<blockquote>
<p>the 3rd unit test is not run. exit on first error</p>
</blockquote>
<p>在pytest出现第一个错误时退出</p>
<pre><code>-x, exitfirst exit instantly on first error or failed test.
pytest -v exitfirst test_log.py
</code></pre>
<p>带鼻子2</p>
<p>-F,fail fast在第一个错误或失败后停止测试运行</p>
^{pr2}$
<p>用鼻子测试</p>
<pre><code> -x, stop Stop running tests after the first error or failure
</code></pre>
<blockquote>
<p>To run all tests, regardless of errors</p>
</blockquote>
<pre><code>pytest -v continue-on-collection-errors test_log.py
continue-on-collection-errors
Force test execution even if collection errors occur.
</code></pre>
<p>检查您的pytest配置,默认值是exit on first error</p>