~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2007-10-24 20:38:50 UTC
  • mto: This revision was merged to the branch mainline in revision 2943.
  • Revision ID: jelmer@samba.org-20071024203850-3f9x8rq4iupamufm
Handle empty inventories in Inventory.copy().

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        self.assertEqual('some-tree-root', inv2.root.file_id)
76
76
        self.assertEqual('hello', inv2['hello-id'].name)
77
77
 
 
78
    def test_copy_empty(self):
 
79
        """Make sure an empty inventory can be copied."""
 
80
        inv = self.make_inventory(root_id=None)
 
81
        inv2 = inv.copy()
 
82
        self.assertIs(None, inv2.root)
 
83
 
78
84
    def test_is_root(self):
79
85
        """Ensure our root-checking code is accurate."""
80
86
        inv = self.make_inventory('TREE_ROOT')