Python Testing with pytest, Second Edition: discussion on xfail (page 78)

While going through the xfail examples, I realised that an xfail test would XFAIL even if the failure was due to a typo in my code rather than an assertion failure. It makes complete sense when you think about it but it would be good to mention that in the discussion on xfail to highlight that it can hide more serious issues.

This could be done in the form of an additional paragraph that highlights the difference between an XFAIL test and a PASS test that explicitly tests a failure scenario.