In test_xfail_handling, only remove __pycache__ if it exists

Previously, the test failed when the directory was not present,
which could have been caused for example by invoking the tests
with PYTHONDONTWRITEBYTECODE=1.

Fixes https://github.com/pytest-dev/pytest/issues/5664
This commit is contained in:
Miro Hrončok
2019-07-26 02:23:14 +02:00
parent 50c7b5d2b5
commit ab39502c98
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
When invoking pytest's own testsuite with ``PYTHONDONTWRITEBYTECODE=1``,
the ``test_xfail_handling`` test no longer fails.