test/unittest_cwconfig.py
branchtls-sprint
changeset 1341 9502d02630bf
parent 1263 01152fffd593
child 1640 65b60f177eb1
--- a/test/unittest_cwconfig.py	Tue Apr 14 11:26:50 2009 +0200
+++ b/test/unittest_cwconfig.py	Tue Apr 14 14:50:28 2009 +0200
@@ -11,7 +11,7 @@
 def unabsolutize(path):
     parts = path.split(os.sep)
     for i, part in reversed(tuple(enumerate(parts))):
-        if part in ('cubicweb', 'cubes', 'cubes'):
+        if part.startswith('cubicweb') or part == 'cubes':
             return '/'.join(parts[i+1:])
     raise Exception('duh? %s' % path)
     
@@ -20,6 +20,9 @@
         self.config = ApptestConfiguration('data')
         self.config._cubes = ('email', 'file')
 
+    def tearDown(self):
+        os.environ.pop('CW_CUBES_PATH', None)
+
     def test_reorder_cubes(self):
         # jpl depends on email and file and comment
         # email depends on file