devtools/testlib.py
branchstable
changeset 5020 30a539c2074d
parent 4958 665eacdd8c50
child 5036 3e436a494ce3
--- a/devtools/testlib.py	Thu Mar 25 15:08:27 2010 +0100
+++ b/devtools/testlib.py	Thu Mar 25 15:11:44 2010 +0100
@@ -248,7 +248,14 @@
 
     def setUp(self):
         pause_tracing()
-        self._init_repo()
+        previous_failure = self.__class__.__dict__.get('_repo_init_failed')
+        if previous_failure is not None:
+            self.skip('repository is not initialised: %r' % previous_failure)
+        try:
+            self._init_repo()
+        except Exception, ex:
+            self.__class__._repo_init_failed = ex
+            raise
         resume_tracing()
         self.setup_database()
         self.commit()