/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

Add installation instructions for git-python.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
class TestGitBlackBox(ExternalBase):
28
28
 
 
29
    def simple_commit(self):
 
30
        # Create a git repository with a revision.
 
31
        tests.run_git('init')
 
32
        builder = tests.GitBranchBuilder()
 
33
        builder.set_file('a', 'text for a\n', False)
 
34
        builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
 
35
        builder.finish()
 
36
 
29
37
    def test_info(self):
30
 
        # Create a git repository with a revision.
31
 
        tests.run_git('init')
32
 
        builder = tests.GitBranchBuilder()
33
 
        builder.set_file('a', 'text for a\n', False)
34
 
        builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
35
 
        builder.finish()
36
 
 
 
38
        self.simple_commit()
37
39
        output, error = self.run_bzr(['info'])
38
40
        self.assertEqual(error, '')
39
41
        self.assertTrue("Repository branch (format: git)" in output)
40
42
 
 
43
    def test_ls(self):
 
44
        self.simple_commit()
 
45
        output, error = self.run_bzr(['ls'])
 
46
        self.assertEqual(error, '')
 
47
        self.assertEqual(output, "a\n")
 
48
 
 
49
    def test_info_verbose(self):
 
50
        self.simple_commit()
 
51
 
 
52
        output, error = self.run_bzr(['info', '-v'])
 
53
        self.assertEqual(error, '')
 
54
        self.assertTrue("Repository branch (format: git)" in output)
 
55
        self.assertTrue("control: Local Git Repository" in output)
 
56
        self.assertTrue("branch: Git Branch" in output)
 
57
        self.assertTrue("repository: Git Repository" in output)
 
58
 
41
59
    def test_log(self):
42
60
        # Smoke test for "bzr log" in a git repository.
43
 
 
44
 
        # Create a git repository with a revision.
45
 
        tests.run_git('init')
46
 
        builder = tests.GitBranchBuilder()
47
 
        builder.set_file('a', 'text for a\n', False)
48
 
        builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
49
 
        builder.finish()
 
61
        self.simple_commit()
50
62
 
51
63
        # Check that bzr log does not fail and includes the revision.
52
64
        output, error = self.run_bzr(['log'])
54
66
        self.assertTrue(
55
67
            '<The commit message>' in output,
56
68
            "Commit message was not found in output:\n%s" % (output,))
 
69
 
 
70
    def test_log_verbose(self):
 
71
        # Smoke test for "bzr log -v" in a git repository.
 
72
        self.simple_commit()
 
73
 
 
74
        # Check that bzr log does not fail and includes the revision.
 
75
        output, error = self.run_bzr(['log', '-v'])
 
76