~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-31 05:56:58 UTC
  • mfrom: (1711.2.28 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060531055658-2fa78bd860286282
[patch] Lalo Martins: add python path information to bzr --version

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()