Fix test_stepwise::test_xfail_handling when byte code writing is disabled

This commit is contained in:
Bruno Oliveira 2019-07-04 21:08:16 -03:00
parent df0cff18ac
commit acb62ba619
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
import sys
import pytest
@ -208,6 +210,7 @@ def test_xfail_handling(testdir):
# because we are writing to the same file, mtime might not be affected enough to
# invalidate the cache, making this next run flaky
if not sys.dont_write_bytecode:
testdir.tmpdir.join("__pycache__").remove()
testdir.makepyfile(contents.format(assert_value="0", strict="True"))
result = testdir.runpytest("--sw", "-v")