[MERGE] Some cleanup in log tests

Marius Kruger amanic at gmail.com
Thu May 7 23:27:30 BST 2009


hi,
thanks a lot for this!
(I saw john's review after I was halfway trough this 1.3k line patch,
so I thought I'll send this in in any case)
I think you should not delay too long with merging this,
as it may block new log hacking until it lands.

+++ bzrlib/tests/blackbox/test_log.py    2009-05-07 17:03:30 +0000
@@ -17,25 +17,31 @@
...
+class TestLog(tests.TestCaseWithTransport):
+
+    def setUp(self):
+        super(TestLog, self).setUp()
+        self.timezone = 0 # UTC
+        self.timestamp =1132617600 # Mon 2005-11-22 00:00:00 +0000
^^^ space after =


@@ -45,94 +51,118 @@
...
+    def check_log(self, expected, args, working_dir='level0'):
+        out, err = self.run_bzr(['log', '--timezone', 'utc'] + args,
+                                working_dir=working_dir)
+        self.assertEqual('', err)
+        self.assertEqualDiff(expected, test_log.normalize_log(out))
+
+
+
^^^ less vertical space
+class TestLogRevSpecs(TestLog):


a number of these:
+        log = self.run_bzr(['log'])[0]
^^^ you don't need a list: log = self.run_bzr('log')[0]   (thats just
my preferance)

the tests pass and you didn't remove any AFAICT :)
bb:tweak

--
<| thx
U| Marius
H| <><



More information about the bazaar mailing list