~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-09 14:47:11 UTC
  • mfrom: (5837.2.5 tree-is-container)
  • Revision ID: pqm@pqm.ubuntu.com-20110509144711-b87xrawe7hozixek
(jelmer) Deprecate Tree.__iter__. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
 
66
66
 
67
67
class MockTree(object):
 
68
 
68
69
    def __init__(self):
69
70
        from bzrlib.inventory import InventoryDirectory, ROOT_ID
70
71
        object.__init__(self)
75
76
 
76
77
    inventory = property(lambda x:x)
77
78
 
78
 
    def __iter__(self):
79
 
        return self.paths.iterkeys()
 
79
    def all_file_ids(self):
 
80
        return set(self.paths.keys())
80
81
 
81
82
    def __getitem__(self, file_id):
82
83
        if file_id == self.root.file_id:
493
494
                                 % (ancestor,))
494
495
 
495
496
                # Now check that the file contents are all correct
496
 
                for inventory_id in old:
 
497
                for inventory_id in old.all_file_ids():
497
498
                    try:
498
499
                        old_file = old.get_file(inventory_id)
499
500
                    except errors.NoSuchFile: