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

Import ZERO_SHA from dulwich.objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
        output, error = self.run_bzr(['branch', 'gitbranch', 'bzrbranch'])
70
70
        self.assertEqual(error, 'Branched 1 revision(s).\n')
71
71
 
 
72
    def test_checkout(self):
 
73
        os.mkdir("gitbranch")
 
74
        GitRepo.init(os.path.join(self.test_dir, "gitbranch"))
 
75
        os.chdir('gitbranch')
 
76
        builder = tests.GitBranchBuilder()
 
77
        builder.set_file('a', 'text for a\n', False)
 
78
        builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
 
79
        builder.finish()
 
80
        os.chdir('..')
 
81
 
 
82
        output, error = self.run_bzr(['checkout', 'gitbranch', 'bzrbranch'])
 
83
        self.assertEqual(error, '')
 
84
        self.assertEqual(output, '')
 
85
 
72
86
    def test_branch_ls(self):
73
87
        self.simple_commit()
74
88
        output, error = self.run_bzr(['ls', '-r-1'])
76
90
        self.assertEqual(output, "a\n")
77
91
 
78
92
    def test_init(self):
79
 
        self.run_bzr("init-repo --git repo") 
 
93
        self.run_bzr("init --git repo") 
80
94
 
81
95
    def test_info_verbose(self):
82
96
        self.simple_commit()
128
142
 
129
143
        output, error = self.run_bzr(["tag", "bar"])
130
144
 
131
 
        self.assertEquals(error, '')
132
 
        self.assertEquals(output, 'Created tag bar.\n')
 
145
        # bzr <= 2.2 emits this message in the output stream
 
146
        # bzr => 2.3 emits this message in the error stream
 
147
        self.assertEquals(error + output, 'Created tag bar.\n')
133
148
 
134
149
    def test_init_repo(self):
135
 
        output, error = self.run_bzr(["init-repo", "--git", "bla.git"])
 
150
        output, error = self.run_bzr(["init", "--git", "bla.git"])
136
151
        self.assertEquals(error, '')
137
 
        self.assertEquals(output, 'Unshared repository with trees (format: git)\nLocation:\n  repository: bla.git\n')
 
152
        self.assertEquals(output, 'Created a standalone tree (format: git)\n')
138
153