[MERGE] More windows test fixes

Martin Pool mbp at canonical.com
Fri Sep 5 06:04:16 BST 2008


Martin Pool has voted approve.
Status is now: Approved
Comment:
+++ bzrlib/tests/blackbox/test_outside_wt.py    2008-08-12 11:12:12 
+0000
@@ -34,6 +34,7 @@
      def test_cwd_log(self):
          tmp_dir = tempfile.mkdtemp()
          self.addCleanup(lambda: osutils.rmtree(tmp_dir))
+        self.addCleanup(lambda: os.chdir('..'))
          os.chdir(tmp_dir)
          out, err = self.run_bzr('log', retcode=3)
          self.assertEqual(u'bzr: ERROR: Not a branch: "%s/".\n'
@@ -49,6 +50,7 @@
      def test_diff_outside_tree(self):
          tmp_dir = tempfile.mkdtemp()
          self.addCleanup(lambda: osutils.rmtree(tmp_dir))
+        self.addCleanup(lambda: os.chdir('..'))
          os.chdir(tmp_dir)
          self.run_bzr('init branch1')
          self.run_bzr(['commit', '-m', 'nothing',

I probably would have changed specifically to the parent directory then 
removed the tree from one callback.  We do define the order in which 
they're called though so your code is fine.


For details, see: 
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C019a01c8fe73%2427a26f30%2476e74d90%24%40com.au%3E
Project: Bazaar



More information about the bazaar mailing list