From 47d56e41ba15c740a36283a709869b0a037273cd Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 27 Aug 2009 12:05:12 +0200 Subject: [PATCH] fix tests to not fail if pyc-file-writing is disabled --HG-- branch : 1.0.x --- py/test/looponfail/testing/test_remote.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/py/test/looponfail/testing/test_remote.py b/py/test/looponfail/testing/test_remote.py index cb814c5be..5cd039e45 100644 --- a/py/test/looponfail/testing/test_remote.py +++ b/py/test/looponfail/testing/test_remote.py @@ -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()