~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_merge_directive.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-05 13:02:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6434.
  • Revision ID: v.ladeuil+lp@free.fr-20120105130231-grtl31ovy72doqp9
Cleanup old blackbox tests and then some. Remove os.chdir() calls, caught a few bugs, make sure we don't leave file handles opened.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2007, 2009-2012 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
234
234
        foo = self.make_branch_and_tree('foo')
235
235
        foo.commit('rev1')
236
236
        bar = self.make_branch_and_tree('bar')
237
 
        os.chdir('foo')
238
 
        self.run_bzr('merge-directive ../bar')
 
237
        self.run_bzr('merge-directive ../bar', working_dir='foo')
239
238
 
240
239
    def test_no_commits(self):
241
240
        foo = self.make_branch_and_tree('foo')
242
241
        bar = self.make_branch_and_tree('bar')
243
 
        os.chdir('foo')
244
242
        self.run_bzr_error(('No revisions to bundle.', ),
245
 
                            'merge-directive ../bar')
 
243
                            'merge-directive ../bar', working_dir='foo')
246
244
 
247
245
    def test_encoding_exact(self):
248
246
        tree1, tree2 = self.prepare_merge_directive()