Fix test_stepwise::test_xfail_handling when byte code writing is disabled
This commit is contained in:
parent
df0cff18ac
commit
acb62ba619
|
@ -1,4 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import sys
|
||||||
|
|
||||||
import pytest
|
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
|
# because we are writing to the same file, mtime might not be affected enough to
|
||||||
# invalidate the cache, making this next run flaky
|
# invalidate the cache, making this next run flaky
|
||||||
|
if not sys.dont_write_bytecode:
|
||||||
testdir.tmpdir.join("__pycache__").remove()
|
testdir.tmpdir.join("__pycache__").remove()
|
||||||
testdir.makepyfile(contents.format(assert_value="0", strict="True"))
|
testdir.makepyfile(contents.format(assert_value="0", strict="True"))
|
||||||
result = testdir.runpytest("--sw", "-v")
|
result = testdir.runpytest("--sw", "-v")
|
||||||
|
|
Loading…
Reference in New Issue