Rev 76: Add blackbox test for info -v in http://people.samba.org/bzr/jelmer/bzr-git/trunk

Jelmer Vernooij jelmer at samba.org
Sat Jul 26 17:27:48 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-git/trunk

------------------------------------------------------------
revno: 76
revision-id: jelmer at samba.org-20080726160902-xj11yfyxs4u5eart
parent: jelmer at samba.org-20080726160853-ugow5uojkd0eq50s
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-07-26 18:09:02 +0200
message:
  Add blackbox test for info -v
modified:
  tests/test_blackbox.py         test_blackbox.py-20071228193717-18el6d8x4qddug3w-1
=== modified file 'tests/test_blackbox.py'
--- a/tests/test_blackbox.py	2008-07-26 15:44:11 +0000
+++ b/tests/test_blackbox.py	2008-07-26 16:09:02 +0000
@@ -26,27 +26,35 @@
 
 class TestGitBlackBox(ExternalBase):
 
+    def simple_commit(self):
+        # Create a git repository with a revision.
+        tests.run_git('init')
+        builder = tests.GitBranchBuilder()
+        builder.set_file('a', 'text for a\n', False)
+        builder.commit('Joe Foo <joe at foo.com>', u'<The commit message>')
+        builder.finish()
+
+
     def test_info(self):
-        # Create a git repository with a revision.
-        tests.run_git('init')
-        builder = tests.GitBranchBuilder()
-        builder.set_file('a', 'text for a\n', False)
-        builder.commit('Joe Foo <joe at foo.com>', u'<The commit message>')
-        builder.finish()
-
+        self.simple_commit()
         output, error = self.run_bzr(['info'])
         self.assertEqual(error, '')
         self.assertTrue("Repository branch (format: git)" in output)
 
+    def test_info_verbose(self):
+        self.simple_commit()
+
+        output, error = self.run_bzr(['info', '-v'])
+        self.assertEqual(error, '')
+        self.assertTrue("Repository branch (format: git)" in output)
+        self.assertTrue("control: Local Git Repository" in output)
+        self.assertTrue("branch: Git Branch" in output)
+        self.assertTrue("repository: Git Repository" in output)
+
     def test_log(self):
         # Smoke test for "bzr log" in a git repository.
 
-        # Create a git repository with a revision.
-        tests.run_git('init')
-        builder = tests.GitBranchBuilder()
-        builder.set_file('a', 'text for a\n', False)
-        builder.commit('Joe Foo <joe at foo.com>', u'<The commit message>')
-        builder.finish()
+        self.simple_commit()
 
         # Check that bzr log does not fail and includes the revision.
         output, error = self.run_bzr(['log'])




More information about the bazaar-commits mailing list