/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

Special-case NULL_REVISION when looking for Git shas.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test the GitDir class"""
18
18
 
19
 
from bzrlib import bzrdir, errors
 
19
from bzrlib import (
 
20
    bzrdir,
 
21
    errors,
 
22
    )
 
23
from bzrlib.tests import TestSkipped
20
24
 
21
 
from bzrlib.plugins.git import dir, tests, workingtree
 
25
from bzrlib.plugins.git import (
 
26
    dir,
 
27
    tests,
 
28
    workingtree,
 
29
    )
22
30
 
23
31
 
24
32
class TestGitDir(tests.TestCaseInTempDir):
35
43
        tests.run_git('init')
36
44
 
37
45
        gd = bzrdir.BzrDir.open('.')
 
46
        raise TestSkipped
38
47
        wt = gd.open_workingtree()
39
48
        self.assertIsInstance(wt, workingtree.GitWorkingTree)
40
49
 
45
54
        self.assertRaises(errors.NoWorkingTree, gd.open_workingtree)
46
55
 
47
56
 
48
 
class TestGitDirFormat(tests.TestCaseInTempDir):
49
 
 
50
 
    _test_needs_features = [tests.GitCommandFeature]
 
57
class TestGitDirFormat(tests.TestCase):
51
58
 
52
59
    def setUp(self):
53
60
        super(TestGitDirFormat, self).setUp()
57
64
        self.assertEquals("Local Git Repository",
58
65
                          self.format.get_format_description())
59
66
 
 
67
    def test_eq(self):
 
68
        format2 = dir.LocalGitBzrDirFormat()
 
69
        self.assertEquals(self.format, format2)
 
70
        self.assertEquals(self.format, self.format)
 
71
        bzr_format = bzrdir.format_registry.make_bzrdir("default")
 
72
        self.assertNotEquals(self.format, bzr_format)
 
73