/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 tests/test_repository.py

Remove explicit use of rich root formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
class TestGitRepositoryFeatures(tests.TestCaseInTempDir):
51
51
    """Feature tests for GitRepository."""
52
52
 
 
53
    _test_needs_features = [tests.GitCommandFeature]
 
54
 
53
55
    def _do_commit(self):
54
56
        builder = tests.GitBranchBuilder()
55
57
        builder.set_file('a', 'text for a\n', False)
67
69
        GitRepo.init(self.test_dir)
68
70
 
69
71
        repo = Repository.open('.')
70
 
        self.assertIsInstance(repo._git, dulwich.repo.BaseRepo)
 
72
        self.assertIsInstance(repo._git, dulwich.repo.Repo)
71
73
 
72
74
    def test_has_revision(self):
73
75
        GitRepo.init(self.test_dir)
117
119
        mapping = builder.finish()
118
120
        return mapping[commit_handle]
119
121
 
120
 
    def test_pack(self):
121
 
        commit_id = self.simple_commit()
122
 
        repo = Repository.open('.')
123
 
        repo.pack()
124
 
 
125
122
    def test_revision_tree(self):
126
123
        commit_id = self.simple_commit()
127
124
        revid = default_mapping.revision_id_foreign_to_bzr(commit_id)
165
162
 
166
163
class TestGitRepository(tests.TestCaseWithTransport):
167
164
 
 
165
    _test_needs_features = [tests.GitCommandFeature]
 
166
 
168
167
    def _do_commit(self):
169
168
        builder = tests.GitBranchBuilder()
170
169
        builder.set_file('a', 'text for a\n', False)
192
191
 
193
192
    def test_all_revision_ids(self):
194
193
        commit_id = self._do_commit()
195
 
        self.assertEquals(
196
 
                set([default_mapping.revision_id_foreign_to_bzr(commit_id)]),
 
194
        self.assertEquals(set(["git-v1:%s" % commit_id]),
197
195
                self.git_repo.all_revision_ids())
198
196
 
199
197
    def test_get_ancestry_null(self):
275
273
class ForeignTestsRepositoryFactory(object):
276
274
 
277
275
    def make_repository(self, transport):
278
 
        return dir.LocalGitControlDirFormat().initialize_on_transport(transport).open_repository()
 
276
        return dir.LocalGitBzrDirFormat().initialize_on_transport(transport).open_repository()