~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testworkingtree.py

  • Committer: Robert Collins
  • Date: 2005-10-30 23:58:46 UTC
  • Revision ID: robertc@robertcollins.net-20051030235846-fda8b626748cce52
Move Branch.read_working_inventory to WorkingTree.

Branch.read_working_inventory has moved to
WorkingTree.read_working_inventory. This necessitated changes to
Branch.get_root_id, and a move of Branch.set_inventory to WorkingTree
as well. To make it clear that a WorkingTree cannot always be obtained
Branch.working_tree() will raise 'errors.NoWorkingTree' if one cannot
be obtained. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        branch = Branch.initialize('.')
64
64
        tree = WorkingTree(branch.base, branch)
65
65
        self.assertEqual(branch, tree.branch)
66
 
        self.assertEqual(branch.inventory, tree._inventory)
67
66
        self.assertEqual(branch.base, tree.basedir)
68
67
    
69
68
    def test_construct_without_branch(self):
70
69
        branch = Branch.initialize('.')
71
70
        tree = WorkingTree(branch.base)
72
71
        self.assertEqual(branch.base, tree.branch.base)
73
 
        self.assertEqual(branch.inventory, tree._inventory)
74
72
        self.assertEqual(branch.base, tree.basedir)
75
73
 
76
74
    def test_basic_relpath(self):