Rev 5254: Start requiring no leaks at all for tests purposes. in file:///home/vila/src/bzr/experimental/leaking-tests/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon May 31 11:20:46 BST 2010


At file:///home/vila/src/bzr/experimental/leaking-tests/

------------------------------------------------------------
revno: 5254
revision-id: v.ladeuil+lp at free.fr-20100531102045-niqso1oe3d54t21v
parent: v.ladeuil+lp at free.fr-20100529155356-1hn89tooo4jq2b1l
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: catch-them-all
timestamp: Mon 2010-05-31 12:20:45 +0200
message:
  Start requiring no leaks at all for tests purposes.
  
  * bzrlib/tests/__init__.py:
  (TestCase._check_leaked_threads): Rude but effective.
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2010-05-25 07:30:27 +0000
+++ b/bzrlib/tests/__init__.py	2010-05-31 10:20:45 +0000
@@ -832,6 +832,7 @@
 
     def _check_leaked_threads(self):
         active = threading.activeCount()
+        self.assertEqual(1, active, '%r is leaking thread(s)' % self.id())
         leaked_threads = active - TestCase._active_threads
         TestCase._active_threads = active
         # If some tests make the number of threads *decrease*, we'll consider



More information about the bazaar-commits mailing list