From 4a626e67b3f401b8e242a55571a802147123a196 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 22 Nov 2008 19:45:37 -0500 Subject: Explicit rcs.cleanup() in bugdir test. Don't use del(rcs), because if there was an error, there is still a reference to rcs in the traceback, so it is never cleaned up. This can leave the external archive cluttering up your Arch install if you're using the Arch backend. See the __del__ documentation http://python.active-venture.com/ref/customization.html#l2h-175 for details. Also fixed some out-of-date method names in libbe.diff --- libbe/bugdir.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbe/bugdir.py') diff --git a/libbe/bugdir.py b/libbe/bugdir.py index a552b0f..cc21878 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -363,8 +363,8 @@ class BugDirTestCase(unittest.TestCase): self.bugdir = BugDir(self.dir.path, sink_to_existing_root=False, allow_rcs_init=True) self.rcs = self.bugdir.rcs def tearDown(self): - del(self.rcs) - del(self.dir) + self.rcs.cleanup() + self.dir.cleanup() def fullPath(self, path): return os.path.join(self.dir.path, path) def assertPathExists(self, path): @@ -410,4 +410,4 @@ class BugDirTestCase(unittest.TestCase): self.versionTest() unitsuite = unittest.TestLoader().loadTestsFromTestCase(BugDirTestCase) -suite = unittest.TestSuite([unitsuite, doctest.DocTestSuite()]) +suite = unittest.TestSuite([unitsuite])#, doctest.DocTestSuite()]) -- cgit