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

**URL:** <https://forum.devtalk.com/t/python-testing-with-pytest-second-edition-discussion-on-xfail-page-78/29716>\
**Category:** PragProg Customers\
**Tags:** book-python-testing-with-pytest-second-edition, suggestion\
**Created:** [18 November 2021 17:11 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition-discussion-on-xfail-page-78/29716 "2021-11-18T17:11:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunogirin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/brunogirin/32/3590_2.png) [@brunogirin](https://forum.devtalk.com/u/brunogirin)\
**Post date:** [18 November 2021 17:11 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition-discussion-on-xfail-page-78/29716/1 "2021-11-18T17:11:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brianokken](https://forum.devtalk.com/user_avatar/forum.devtalk.com/brianokken/32/846_2.png) [@brianokken](https://forum.devtalk.com/u/brianokken)\
**Post date:** [3 December 2021 05:32 UTC](https://forum.devtalk.com/t/python-testing-with-pytest-second-edition-discussion-on-xfail-page-78/29716/2 "2021-12-03T05:32:33Z")

</div>

Interesting. I’ll re-read and think about it.
