Rev 1262: Cherrypick core.so tests. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4

Jelmer Vernooij jelmer at samba.org
Sun Jun 22 09:14:56 BST 2008


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

------------------------------------------------------------
revno: 1262
revision-id: jelmer at samba.org-20080622081455-pyq63uo7pxs1u85v
parent: jelmer at samba.org-20080622080910-mchppe3df4fwkw0s
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 10:14:55 +0200
message:
  Cherrypick core.so tests.
added:
  tests/test_core.py             test_core.py-20080603032119-q91zmret1lv84ay9-1
modified:
  tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2008-06-22 07:44:40 +0000
+++ b/tests/__init__.py	2008-06-22 08:14:55 +0000
@@ -374,6 +374,7 @@
             'test_commit',
             'test_config',
             'test_convert',
+            'test_core',
             'test_errors',
             'test_fetch',
             'test_fileids', 

=== added file 'tests/test_core.py'
--- a/tests/test_core.py	1970-01-01 00:00:00 +0000
+++ b/tests/test_core.py	2008-06-22 08:14:55 +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/>.
+
+"""Subversion core library tests."""
+
+from bzrlib.tests import TestCase
+from bzrlib.plugins.svn import core
+
+class TestCore(TestCase):
+    def setUp(self):
+        super(TestCore, self).setUp()
+
+    def test_exc(self):
+        self.assertIsInstance(core.SubversionException("foo", 1), Exception)
+
+    def test_get_config(self):
+        self.assertIsInstance(core.get_config(), dict)
+
+    def test_time_from_cstring(self):
+        self.assertEquals(1225704780716938L, core.time_from_cstring("2008-11-03T09:33:00.716938Z"))
+
+    def test_time_to_cstring(self):
+        self.assertEquals("2008-11-03T09:33:00.716938Z", core.time_to_cstring(1225704780716938L))
+




More information about the bazaar-commits mailing list