/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_dir.py

More work on roundtrip push support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test the GitDir class"""
18
18
 
 
19
from dulwich.repo import Repo as GitRepo
 
20
 
19
21
from bzrlib import (
20
22
    bzrdir,
21
23
    errors,
31
33
 
32
34
class TestGitDir(tests.TestCaseInTempDir):
33
35
 
34
 
    _test_needs_features = [tests.GitCommandFeature]
35
 
 
36
36
    def test_open_existing(self):
37
 
        tests.run_git('init')
 
37
        GitRepo.init(".")
38
38
 
39
39
        gd = bzrdir.BzrDir.open('.')
40
40
        self.assertIsInstance(gd, dir.LocalGitDir)
41
41
 
42
42
    def test_open_workingtree(self):
43
 
        tests.run_git('init')
 
43
        GitRepo.init(".")
44
44
 
45
45
        gd = bzrdir.BzrDir.open('.')
46
46
        raise TestSkipped
48
48
        self.assertIsInstance(wt, workingtree.GitWorkingTree)
49
49
 
50
50
    def test_open_workingtree_bare(self):
51
 
        tests.run_git('--bare', 'init')
 
51
        GitRepo.init_bare(".")
52
52
 
53
53
        gd = bzrdir.BzrDir.open('.')
54
54
        self.assertRaises(errors.NoWorkingTree, gd.open_workingtree)
58
58
 
59
59
    def setUp(self):
60
60
        super(TestGitDirFormat, self).setUp()
61
 
        self.format = dir.LocalGitBzrDirFormat()
 
61
        self.format = dir.LocalGitControlDirFormat()
62
62
 
63
63
    def test_get_format_description(self):
64
64
        self.assertEquals("Local Git Repository",
65
65
                          self.format.get_format_description())
66
66
 
67
67
    def test_eq(self):
68
 
        format2 = dir.LocalGitBzrDirFormat()
 
68
        format2 = dir.LocalGitControlDirFormat()
69
69
        self.assertEquals(self.format, format2)
70
70
        self.assertEquals(self.format, self.format)
71
71
        bzr_format = bzrdir.format_registry.make_bzrdir("default")