Rev 4662: Cleanup more bzr-limbo-XXXXXX leaks in /tmp during selftest. in file:///home/vila/src/bzr/experimental/test-isolation/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Sep 2 10:00:54 BST 2009


At file:///home/vila/src/bzr/experimental/test-isolation/

------------------------------------------------------------
revno: 4662
revision-id: v.ladeuil+lp at free.fr-20090902090054-tv964xyjkak9yl20
parent: v.ladeuil+lp at free.fr-20090902084344-q2yw9enwayqkwsrm
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-isolation
timestamp: Wed 2009-09-02 11:00:54 +0200
message:
  Cleanup more bzr-limbo-XXXXXX leaks in /tmp during selftest.
  
  * bzrlib/tests/test_shelf.py:
  (TestUnshelver.test_make_merger,
  TestUnshelver.test_unshelve_changed,
  TestUnshelver.test_unshelve_deleted,
  TestShelfManager.test_shelve_changes): Add the missing finalize()
  cleanup call.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_shelf.py'
--- a/bzrlib/tests/test_shelf.py	2009-08-25 21:09:17 +0000
+++ b/bzrlib/tests/test_shelf.py	2009-09-02 09:00:54 +0000
@@ -494,6 +494,7 @@
             shelf_file.seek(0)
             unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
             unshelver.make_merger().do_merge()
+            self.addCleanup(unshelver.finalize)
             self.assertFileEqual('bar', 'tree/foo')
         finally:
             shelf_file.close()
@@ -517,6 +518,7 @@
         self.build_tree_contents([('tree/foo', 'z\na\nb\nc\n')])
         shelf_file.seek(0)
         unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
+        self.addCleanup(unshelver.finalize)
         unshelver.make_merger().do_merge()
         self.assertFileEqual('z\na\nb\nd\n', 'tree/foo')
 
@@ -545,6 +547,7 @@
         self.assertFileEqual('baz', 'tree/foo/bar')
         shelf_file.seek(0)
         unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
+        self.addCleanup(unshelver.finalize)
         unshelver.make_merger().do_merge()
         self.assertFalse('foo-id' in tree)
         self.assertFalse('bar-id' in tree)
@@ -690,6 +693,7 @@
         shelf_id = shelf_manager.shelve_changes(creator)
         self.failIfExists('tree/foo')
         unshelver = shelf_manager.get_unshelver(shelf_id)
+        self.addCleanup(unshelver.finalize)
         unshelver.make_merger().do_merge()
         self.assertFileEqual('bar', 'tree/foo')
 



More information about the bazaar-commits mailing list