~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_subsume.py

(gz) Fix test failure on alpha by correcting format string for
 gc_chk_sha1_record (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        # this test checks the subdir is removed, so it needs to know the
65
65
        # control directory; that changes rarely so just hardcode (and check)
66
66
        # it is correct.
67
 
        self.assertPathExists('tree/subtree/.bzr')
 
67
        self.failUnlessExists('tree/subtree/.bzr')
68
68
        base_tree.subsume(sub_tree)
69
69
        self.assertEqual(['tree-1', 'subtree-1'], base_tree.get_parent_ids())
70
70
        self.assertEqual(sub_root_id, base_tree.path2id('subtree'))
71
71
        self.assertEqual('file2-id', base_tree.path2id('subtree/file2'))
72
72
        # subsuming the tree removes the control directory, so you can't open
73
73
        # it.
74
 
        self.assertPathDoesNotExist('tree/subtree/.bzr')
 
74
        self.failIfExists('tree/subtree/.bzr')
75
75
        file2 = open('tree/subtree/file2', 'rb')
76
76
        try:
77
77
            file2_contents = file2.read()
91
91
        self.assertEqualDiff(file2_contents,
92
92
                             basis_tree.get_file_text('file2-id'))
93
93
        self.assertEqual('subtree-1',
94
 
                         basis_tree.get_file_revision('file2-id'))
 
94
                         basis_tree.inventory['file2-id'].revision)
95
95
        self.assertEqual('combined-1',
96
 
                         basis_tree.get_file_revision(sub_root_id))
 
96
                         basis_tree.inventory[sub_root_id].revision)
97
97
 
98
98
    def test_subsume_failure(self):
99
99
        base_tree, sub_tree = self.make_trees()