~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/test_link_tree.py

  • Committer: Aaron Bentley
  • Date: 2010-02-25 04:15:25 UTC
  • mfrom: (730.1.5 2.0)
  • Revision ID: aaron@aaronbentley.com-20100225041525-41kwgjtklpflxhbw
Merged 2.0 into 2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib.transform import TreeTransform
20
20
from bzrlib.tests import TestCaseWithTransport, HardlinkFeature
21
21
 
 
22
from bzrlib.plugins.bzrtools import command
22
23
from bzrlib.plugins.bzrtools.link_tree import link_tree
23
24
 
24
25
 
73
74
 
74
75
    def test_link_tree(self):
75
76
        """Ensure the command works as intended"""
76
 
        os.chdir('child')
77
 
        self.parent_tree.unlock()
78
 
        self.run_bzr('link-tree ../parent')
79
 
        self.assertTrue(self.hardlinked())
80
 
        # want teh addCleanup to work properly
81
 
        self.parent_tree.lock_write()
 
77
        command._testing = True
 
78
        try:
 
79
            os.chdir('child')
 
80
            self.parent_tree.unlock()
 
81
            self.run_bzr('link-tree ../parent')
 
82
            self.assertTrue(self.hardlinked())
 
83
            # want teh addCleanup to work properly
 
84
            self.parent_tree.lock_write()
 
85
        finally:
 
86
            command._testing = False