~lifeless/bzr/index.range_map

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

  • Committer: Robert Collins
  • Date: 2008-06-19 01:17:19 UTC
  • mfrom: (3218.1.277 +trunk)
  • Revision ID: robertc@robertcollins.net-20080619011719-1c4g4uxzzhdls2wf
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.bzrdir import BzrDir
29
29
from bzrlib.lockdir import LockDir
30
30
from bzrlib.mutabletree import needs_tree_write_lock
31
 
from bzrlib.symbol_versioning import zero_thirteen
32
31
from bzrlib.tests import TestCase, TestCaseWithTransport, TestSkipped
33
32
from bzrlib.transport import get_transport
34
33
from bzrlib.workingtree import (
95
94
        return "Sample tree format."
96
95
 
97
96
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
98
 
                   accelerator_tree=None):
 
97
                   accelerator_tree=None, hardlink=False):
99
98
        """Sample branches cannot be created."""
100
99
        t = a_bzrdir.get_workingtree_transport(self)
101
100
        t.put_bytes('format', self.get_format_string())
217
216
        control.create_repository()
218
217
        control.create_branch()
219
218
        tree = workingtree.WorkingTreeFormat3().initialize(control)
220
 
        tree._control_files._transport.delete("pending-merges")
 
219
        tree._transport.delete("pending-merges")
221
220
        self.assertEqual([], tree.get_parent_ids())
222
221
 
223
222
 
251
250
        self.assertEqual(list(tree.conflicts()), [expected])
252
251
 
253
252
 
254
 
class TestNonFormatSpecificCode(TestCaseWithTransport):
255
 
    """This class contains tests of workingtree that are not format specific."""
256
 
 
257
 
    def test_gen_file_id(self):
258
 
        file_id = self.applyDeprecated(zero_thirteen, workingtree.gen_file_id,
259
 
                                      'filename')
260
 
        self.assertStartsWith(file_id, 'filename-')
261
 
 
262
 
    def test_gen_root_id(self):
263
 
        file_id = self.applyDeprecated(zero_thirteen, workingtree.gen_root_id)
264
 
        self.assertStartsWith(file_id, 'tree_root-')
265
 
        
266
 
 
267
253
class InstrumentedTree(object):
268
254
    """A instrumented tree to check the needs_tree_write_lock decorator."""
269
255