~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Jelmer Vernooij
  • Date: 2006-12-12 22:40:01 UTC
  • mto: This revision was merged to the branch mainline in revision 2180.
  • Revision ID: jelmer@samba.org-20061212224001-3ljlrqvd0k3zc675
Make add_path() return inventory entry for root just like it does for other entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
class TestInventory(TestCase):
34
34
 
 
35
    def test_add_path(self):
 
36
 
 
37
        inv = Inventory(root_id=None)
 
38
        self.assertIs(None, inv.root)
 
39
        ie = inv.add_path("", "directory", "my-root")
 
40
        self.assertEqual("my-root", ie.file_id)
 
41
        self.assertIs(ie, inv.root)
 
42
 
35
43
    def test_is_within(self):
36
44
 
37
45
        SRC_FOO_C = pathjoin('src', 'foo.c')