~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

(robertc) Introduce Tree interface implementation tests. This corrects behaviour differences in Tree implementations for the __iter__ interface which were revealed by the new tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import sys
20
20
import tempfile
21
21
 
 
22
from bzrlib import inventory
22
23
from bzrlib.builtins import merge
23
24
from bzrlib.bzrdir import BzrDir
24
25
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
290
291
    def test_iteration(self):
291
292
        """Ensure that iteration through ids works properly"""
292
293
        btree = self.make_tree_1()[0]
293
 
        self.assertEqual(self.sorted_ids(btree), ['a', 'b', 'c', 'd'])
 
294
        self.assertEqual(self.sorted_ids(btree),
 
295
            [inventory.ROOT_ID, 'a', 'b', 'c', 'd'])
294
296
        btree.note_deletion("grandparent/parent/file")
295
297
        btree.note_id("e", "grandparent/alt_parent/fool", kind="directory")
296
298
        btree.note_last_changed("grandparent/alt_parent/fool", 
297
299
                                "revisionidiguess")
298
 
        self.assertEqual(self.sorted_ids(btree), ['a', 'b', 'd', 'e'])
 
300
        self.assertEqual(self.sorted_ids(btree),
 
301
            [inventory.ROOT_ID, 'a', 'b', 'd', 'e'])
299
302
 
300
303
 
301
304
class BundleTester(TestCaseWithTransport):