~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/inventory_implementations/basics.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-09 21:50:57 UTC
  • mfrom: (3616.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20080809215057-4tnxs63ngab9gm8a
(Jelmer) Fix copying of root revision in inventory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        inv2 = inv.copy()
82
82
        self.assertIs(None, inv2.root)
83
83
 
 
84
    def test_copy_copies_root_revision(self):
 
85
        """Make sure the revision of the root gets copied."""
 
86
        inv = self.make_inventory(root_id='someroot')
 
87
        inv.root.revision = 'therev'
 
88
        inv2 = inv.copy()
 
89
        self.assertEquals('someroot', inv2.root.file_id)
 
90
        self.assertEquals('therev', inv2.root.revision)
 
91
 
84
92
    def test_is_root(self):
85
93
        """Ensure our root-checking code is accurate."""
86
94
        inv = self.make_inventory('TREE_ROOT')