devtools/testlib.py
branchstable
changeset 5020 30a539c2074d
parent 4958 665eacdd8c50
child 5036 3e436a494ce3
equal deleted inserted replaced
5019:72734c210836 5020:30a539c2074d
   246 
   246 
   247     # default test setup and teardown #########################################
   247     # default test setup and teardown #########################################
   248 
   248 
   249     def setUp(self):
   249     def setUp(self):
   250         pause_tracing()
   250         pause_tracing()
   251         self._init_repo()
   251         previous_failure = self.__class__.__dict__.get('_repo_init_failed')
       
   252         if previous_failure is not None:
       
   253             self.skip('repository is not initialised: %r' % previous_failure)
       
   254         try:
       
   255             self._init_repo()
       
   256         except Exception, ex:
       
   257             self.__class__._repo_init_failed = ex
       
   258             raise
   252         resume_tracing()
   259         resume_tracing()
   253         self.setup_database()
   260         self.setup_database()
   254         self.commit()
   261         self.commit()
   255         MAILBOX[:] = [] # reset mailbox
   262         MAILBOX[:] = [] # reset mailbox
   256 
   263