~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

(jelmer) Only track threads on bzrlib testcases. (Martin [gz])

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()