/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Martin
  • Date: 2010-12-26 16:23:16 UTC
  • mto: This revision was merged to the branch mainline in revision 5582.
  • Revision ID: gzlist@googlemail.com-20101226162316-yt09mce69j2esn52
Do thread leak detection on bzrlib TestCase instances only rather than anything with addCleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
286
286
        addOnException = getattr(test, "addOnException", None)
287
287
        if addOnException is not None:
288
288
            addOnException(self._record_traceback_from_test)
289
 
        # Only check for thread leaks if the test case supports cleanups
290
 
        addCleanup = getattr(test, "addCleanup", None)
291
 
        if addCleanup is not None:
292
 
            addCleanup(self._check_leaked_threads, test)
 
289
        # Only check for thread leaks on bzrlib derived test cases
 
290
        if isinstance(test, TestCase):
 
291
            test.addCleanup(self._check_leaked_threads, test)
293
292
 
294
293
    def startTests(self):
295
294
        self.report_tests_starting()