Rev 4962: Some more cleanup. in file:///home/vila/src/bzr/bugs/476293-log-check-ancestor/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Jan 19 14:27:51 GMT 2010


At file:///home/vila/src/bzr/bugs/476293-log-check-ancestor/

------------------------------------------------------------
revno: 4962
revision-id: v.ladeuil+lp at free.fr-20100119142751-47axw8sneqj1u42o
parent: v.ladeuil+lp at free.fr-20100119073822-dwjmolfkftpim12j
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: respect-direction
timestamp: Tue 2010-01-19 15:27:51 +0100
message:
  Some more cleanup.
  
  * bzrlib/tests/blackbox/test_log.py:
  (TestLogRevSpecs.test_log_change_revno): Forgotten in previous
  refactoring.
  (TestLogErrors.test_log_nonexistent_revno): Cleanup useless code.
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_log.py'
--- a/bzrlib/tests/blackbox/test_log.py	2010-01-19 07:38:22 +0000
+++ b/bzrlib/tests/blackbox/test_log.py	2010-01-19 14:27:51 +0000
@@ -181,6 +181,10 @@
         self.make_linear_branch()
         self.assertLogRevnos(['-l', '2'], ['3', '2'])
 
+    def test_log_change_revno(self):
+        self.make_linear_branch()
+        self.assertLogRevnos(['-c1'], ['1'])
+
 
 class TestBug474807(TestLogWithLogCatcher):
 
@@ -268,37 +272,27 @@
 
     def test_log_nonexistent_revno(self):
         self.make_minimal_branch()
-        (out, err) = self.run_bzr_error(
-            ["bzr: ERROR: Requested revision: '1234' "
-             "does not exist in branch:"],
-            ['log', '-r1234'])
+        self.run_bzr_error(["bzr: ERROR: Requested revision: '1234' "
+                            "does not exist in branch:"],
+                           ['log', '-r1234'])
 
     def test_log_nonexistent_dotted_revno(self):
         self.make_minimal_branch()
-        (out, err) = self.run_bzr_error(
-            ["bzr: ERROR: Requested revision: '123.123' "
-             "does not exist in branch:"],
-            ['log',  '-r123.123'])
-
-    def test_log_change_revno(self):
-        self.make_linear_branch()
-        expected_log = self.run_bzr("log -r 1")[0]
-        log = self.run_bzr("log -c 1")[0]
-        self.assertEqualDiff(expected_log, log)
+        self.run_bzr_error(["bzr: ERROR: Requested revision: '123.123' "
+                            "does not exist in branch:"],
+                           ['log',  '-r123.123'])
 
     def test_log_change_nonexistent_revno(self):
         self.make_minimal_branch()
-        (out, err) = self.run_bzr_error(
-            ["bzr: ERROR: Requested revision: '1234' "
-             "does not exist in branch:"],
-            ['log',  '-c1234'])
+        self.run_bzr_error(["bzr: ERROR: Requested revision: '1234' "
+                            "does not exist in branch:"],
+                           ['log',  '-c1234'])
 
     def test_log_change_nonexistent_dotted_revno(self):
         self.make_minimal_branch()
-        (out, err) = self.run_bzr_error(
-            ["bzr: ERROR: Requested revision: '123.123' "
-             "does not exist in branch:"],
-            ['log', '-c123.123'])
+        self.run_bzr_error(["bzr: ERROR: Requested revision: '123.123' "
+                            "does not exist in branch:"],
+                           ['log', '-c123.123'])
 
     def test_log_change_single_revno_only(self):
         self.make_minimal_branch()
@@ -345,6 +339,11 @@
             ": nothing to repeat\n", err)
         self.assertEqual('', out)
 
+    def test_log_unsupported_timezone(self):
+        self.make_linear_branch()
+        self.run_bzr_error(['bzr: ERROR: Unsupported timezone format "foo", '
+                            'options are "utc", "original", "local".'],
+                           ['log', '--timezone', 'foo'])
 
 
 class TestLogTags(TestLog):
@@ -380,15 +379,6 @@
         self.assertContainsRe(log, r'tags: tag1')
 
 
-class TestLogTimeZone(TestLog):
-
-    def test_log_unsupported_timezone(self):
-        self.make_linear_branch()
-        self.run_bzr_error(['bzr: ERROR: Unsupported timezone format "foo", '
-                            'options are "utc", "original", "local".'],
-                           ['log', '--timezone', 'foo'])
-
-
 class TestLogVerbose(TestLog):
 
     def setUp(self):



More information about the bazaar-commits mailing list