# HG changeset patch # User Pierre-Yves David # Date 1269526304 -3600 # Node ID 30a539c2074d7ef45408df8e1f0012e3c0a4e86c # Parent 72734c21083681aa7f19fe5c8318e8874b19a9f9 When a TC failed to initiliase the database, the following test are SKIPPED When a TC failed to initiliase the database, the other test of the same TestCase are skipped with an explicite message instead of failing later for with an unrelated message. diff -r 72734c210836 -r 30a539c2074d devtools/testlib.py --- 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()