fix tests to not fail if pyc-file-writing is disabled

--HG--
branch : 1.0.x
This commit is contained in:
holger krekel 2009-08-27 12:05:12 +02:00
parent c981ead40e
commit 47d56e41ba
1 changed files with 6 additions and 2 deletions

View File

@ -17,7 +17,9 @@ class TestRemoteControl:
assert failures
control.setup()
item.fspath.write("def test_func(): assert 1\n")
(item.fspath + "c").remove()
pyc = item.fspath.new(ext=".pyc")
if pyc.check():
pyc.remove()
failures = control.runsession(failures)
assert not failures
@ -37,7 +39,9 @@ class TestRemoteControl:
def test_new():
assert 0
"""))
(modcol.fspath + "c").remove()
pyc = modcol.fspath.new(ext=".pyc")
if pyc.check():
pyc.remove()
failures = control.runsession(failures)
assert not failures
control.setup()