Rev 1444: Add tests for new log functionality. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Mon Jul 7 16:06:14 BST 2008


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

------------------------------------------------------------
revno: 1444
revision-id: jelmer at samba.org-20080707150613-lbw0fzlf5dgb0d1q
parent: jelmer at samba.org-20080707145706-9ay97prybptjh9sh
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-07-07 17:06:13 +0200
message:
  Add tests for new log functionality.
added:
  tests/test_log.py              test_log.py-20080707150233-jwwy10h0byik6jxj-1
modified:
  tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2008-07-03 22:10:49 +0000
+++ b/tests/__init__.py	2008-07-07 15:06:13 +0000
@@ -327,6 +327,7 @@
             'test_errors',
             'test_fetch',
             'test_fileids', 
+            'test_log',
             'test_logwalker',
             'test_mapping',
             'test_properties',

=== added file 'tests/test_log.py'
--- a/tests/test_log.py	1970-01-01 00:00:00 +0000
+++ b/tests/test_log.py	2008-07-07 15:06:13 +0000
@@ -0,0 +1,36 @@
+# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer at samba.org>
+ 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from bzrlib.plugins.svn.log import show_subversion_properties
+from bzrlib.revision import Revision
+
+from bzrlib.tests import TestCase
+
+class LogTestCase(TestCase):
+    def test_notsvn(self):
+        self.assertEquals({}, show_subversion_properties(Revision("foo")))
+
+    def test_svnprops(self):
+        rev = Revision("foo")
+        rev.svn_revision = 2
+        rev.svn_branch = "bar"
+        self.assertEquals({"svn revno": "2 (on /bar)"}, 
+                          show_subversion_properties(rev))
+
+    def test_svnrevid(self):
+        rev = Revision("svn-v3-trunk0:someuuid:lala:23")
+        self.assertEquals({"svn revno": "23 (on /lala)"},
+                          show_subversion_properties(rev))
+




More information about the bazaar-commits mailing list