~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-01-05 17:46:44 UTC
  • mfrom: (6423.1.1 os-chdir-is-bad)
  • Revision ID: pqm@pqm.ubuntu.com-20120105174644-3in053mac5now0up
(vila) Cleanup some blackbox tests from obsolete idioms. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-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
120
120
        tree = self.make_branch_and_tree('.')
121
121
        tree.add(['sub1', 'sub1/sub2', 'sub1/hello.txt'])
122
122
 
123
 
        os.chdir('sub1/sub2')
124
 
        self.run_bzr('mv ../hello.txt .')
125
 
        self.assertPathExists('./hello.txt')
 
123
        self.run_bzr('mv ../hello.txt .', working_dir='sub1/sub2')
 
124
        self.assertPathExists('sub1/sub2/hello.txt')
126
125
 
127
 
        os.chdir('..')
128
 
        self.run_bzr('mv sub2/hello.txt .')
129
 
        os.chdir('..')
 
126
        self.run_bzr('mv sub2/hello.txt .', working_dir='sub1')
130
127
        self.assertMoved('sub1/sub2/hello.txt','sub1/hello.txt')
131
128
 
132
129
    def test_mv_change_case_file(self):