<div dir="ltr">Hi Chris,<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 22, 2018 at 4:26 PM Chris Jerdonek &lt;<a href="mailto:chris.jerdonek@gmail.com">chris.jerdonek@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note that in James&#39;s case the alternative would be the unconditional<br>
@pytest.mark.skip() rather than the conditional skipif() because there<br>
aren&#39;t cases where the test would be passing. The pytest docs give &quot;no<br>
way of currently testing this&quot; as a sample reason for skipping a test:<br>
<a href="https://docs.pytest.org/en/documentation-restructure/how-to/skipping.html#skipping-test-functions" rel="noreferrer" target="_blank">https://docs.pytest.org/en/documentation-restructure/how-to/skipping.html#skipping-test-functions</a></blockquote><div><br></div><div>Thanks for pointing that out, we probably should update the reason to something more meaningful. </div><div><br></div><div>The previous section (<a href="https://docs.pytest.org/en/latest/skipping.html#skip-and-xfail-dealing-with-tests-that-cannot-succeed">https://docs.pytest.org/en/latest/skipping.html#skip-and-xfail-dealing-with-tests-that-cannot-succeed</a>) shows a clearer distinction between `skip` and `xfail`.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unconditionally skipping tests is also useful in cases where the test<br>
isn&#39;t implemented yet, but you eventually do want to implement it<br>
(e.g. an empty or incomplete test function that might not necessarily<br>
raise an exception in its current state). </blockquote><div><br></div><div>Definitely. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another reason is flaky<br>
tests that sometimes fail and sometimes succeed, so that xfail()<br>
wouldn&#39;t work as a substitute.<br></blockquote><div><br></div><div>Indeed, but in James&#39; case I think `xfail(strict=True)` is the way to go, because it will *fail* the test if it suddenly starts passing because the fake now works as expected, which is a good thing because then that opportunity can be used to remove the marker. A skip will stay in there forever until someone takes notice by some other means. </div><div><br></div><div>Cheers,</div><div>Bruno.</div></div></div>