Comment 2 for bug 239097

Revision history for this message
Vincent Ladeuil (vila) wrote :

Ran into it again.

The fix is trivial :

=== modified file 'tests/test_script.py'
--- tests/test_script.py 2008-02-06 06:55:50 +0000
+++ tests/test_script.py 2008-10-01 15:59:41 +0000
@@ -18,7 +18,7 @@
 import random
 import string

-from bzrlib.tests import TestCase
+from bzrlib.tests import TestCaseInTempDir

 from bzrlib.plugins.usertest import (
     toolprofiler,
@@ -28,7 +28,7 @@
     )

-class TestScriptTask(TestCase):
+class TestScriptTask(TestCaseInTempDir):

     def test_compile(self):
         task = userscript.ScriptTask()

In fact, it wasn't lazy coding on your part, bzrlib.test.TestCase really set HOME as os.getcwd() but all our tests relies on TestCaseInTempDir to clean after themselves.

I can't push to lp:bzr-usertest though.