~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Aaron Bentley
  • Date: 2006-06-03 16:23:09 UTC
  • mfrom: (1736 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: aaron.bentley@utoronto.ca-20060603162309-c975ca9ea9fea344
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        
62
62
        self.assert_('src-id' in inv)
63
63
 
 
64
    def test_iter_entries(self):
 
65
        inv = Inventory()
 
66
        
 
67
        for args in [('src', 'directory', 'src-id'), 
 
68
                     ('doc', 'directory', 'doc-id'), 
 
69
                     ('src/hello.c', 'file', 'hello-id'),
 
70
                     ('src/bye.c', 'file', 'bye-id'),
 
71
                     ('Makefile', 'file', 'makefile-id')]:
 
72
            inv.add_path(*args)
 
73
 
 
74
        self.assertEqual([
 
75
            ('Makefile', 'makefile-id'),
 
76
            ('doc', 'doc-id'),
 
77
            ('src', 'src-id'),
 
78
            ('src/bye.c', 'bye-id'),
 
79
            ('src/hello.c', 'hello-id'),
 
80
            ], [(path, ie.file_id) for path, ie in inv.iter_entries()])
 
81
            
64
82
    def test_version(self):
65
83
        """Inventory remembers the text's version."""
66
84
        inv = Inventory()