/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_tree/test_path_content_summary.py

Merge the path-content-summary and preview tree test tweaks.

Requires resolving a small conflict, because a test that was raising the
wrong exception now doesn't need to raise anything.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        self.assertSubset((summary[3],),
97
97
            (None, '0c352290ae1c26ca7f97d5b2906c4624784abd60'))
98
98
 
 
99
    def test_file_content_summary_not_versioned(self):
 
100
        tree = self.make_branch_and_tree('tree')
 
101
        self.build_tree(['tree/path'])
 
102
        tree = self._convert_tree(tree)
 
103
        summary = tree.path_content_summary('path')
 
104
        self.assertEqual(4, len(summary))
 
105
        if isinstance(tree, (per_tree.DirStateRevisionTree,
 
106
                             per_tree.RevisionTree)):
 
107
            self.assertEqual('missing', summary[0])
 
108
            self.assertIs(None, summary[2])
 
109
            self.assertIs(None, summary[3])
 
110
        elif isinstance(tree, transform._PreviewTree):
 
111
            self.expectFailure('PreviewTree returns "missing" for unversioned'
 
112
                'files', self.assertEqual, 'file', summary[0])
 
113
            self.assertEqual('file', summary[0])
 
114
        else:
 
115
            self.assertEqual('file', summary[0])
 
116
            self.check_content_summary_size(tree, summary, 22)
 
117
            self.assertEqual(False, summary[2])
 
118
        self.assertSubset((summary[3],),
 
119
            (None, '0c352290ae1c26ca7f97d5b2906c4624784abd60'))
 
120
 
99
121
    def test_file_content_summary_non_exec(self):
100
122
        tree = self.make_branch_and_tree('tree')
101
123
        self.build_tree(['tree/path'])