diff tests/common.py @ 58:3d413c54e048

tests: be prepared for basetest.setUp not being called tests might choose to do something else
author Idan Kamara <idankk86@gmail.com>
date Fri, 19 Aug 2011 20:08:13 +0300
parents eac8be119d81
children 730c42743ba3
line wrap: on
line diff
--- a/tests/common.py	Fri Aug 19 20:08:13 2011 +0300
+++ b/tests/common.py	Fri Aug 19 20:08:13 2011 +0300
@@ -15,7 +15,10 @@
         self.client = hglib.open()
 
     def tearDown(self):
-        shutil.rmtree(self._testtmp)
+        try:
+            shutil.rmtree(self._testtmp)
+        except AttributeError:
+            pass # if our setUp was overriden
 
     def append(self, path, *args):
         f = open(path, 'a')