擅长:python、mysql、java
<p>pytest从测试或设置函数中支持命令式xfail。在</p>
<p>使用您拥有的try/except代码,并将<code>pytest.xfail('some message')</code>包含在<code>except</code>主体中。在</p>
<p>参见:
<a href="http://doc.pytest.org/en/latest/skipping.html#imperative-xfail-from-within-a-test-or-setup-function" rel="nofollow">http://doc.pytest.org/en/latest/skipping.html#imperative-xfail-from-within-a-test-or-setup-function</a></p>