~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2010-04-28 07:53:34 UTC
  • mto: This revision was merged to the branch mainline in revision 5192.
  • Revision ID: mbp@sourcefrog.net-20100428075334-mbrtapod09d7v6ea
wrap os.rename to insert the source and destination filenames in any exception that may be raised

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import os
22
22
 
 
23
from bzrlib import osutils
23
24
from bzrlib.workingtree import WorkingTree
24
25
from bzrlib.tests.blackbox import ExternalBase
25
26
from bzrlib.directory_service import directories
167
168
    def prepare_lightweight_switch(self):
168
169
        branch = self.make_branch('branch')
169
170
        branch.create_checkout('tree', lightweight=True)
170
 
        os.rename('branch', 'branch1')
 
171
        osutils.rename('branch', 'branch1')
171
172
 
172
173
    def test_switch_lightweight_after_branch_moved(self):
173
174
        self.prepare_lightweight_switch()