Rev 21: add test framework in file:///home/jelmer/bzr-cia/trunk/

Jelmer Vernooij jelmer at samba.org
Mon Mar 19 16:36:06 GMT 2007


At file:///home/jelmer/bzr-cia/trunk/

------------------------------------------------------------
revno: 21
revision-id: jelmer at samba.org-20070312124119-l1krka8f2xczvum8
parent: jelmer at samba.org-20070304144121-bdu009eezym7i8bu
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2007-03-12 13:41:19 +0100
message:
  add test framework
added:
  tests/                         tests-20070312123353-6u1l6vu99nn9q74s-1
  tests/__init__.py              __init__.py-20070312123353-6u1l6vu99nn9q74s-2
modified:
  __init__.py                    __init__.py-20060326151358-eca40ae045b6d836
=== added directory 'tests'
=== added file 'tests/__init__.py'
--- a/tests/__init__.py	1970-01-01 00:00:00 +0000
+++ b/tests/__init__.py	2007-03-12 12:41:19 +0000
@@ -0,0 +1,30 @@
+# Copyright (C) 2006 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+from bzrlib.tests import TestCase
+
+def test_suite():
+    from unittest import TestSuite, TestLoader
+    
+    from bzrlib.tests import TestUtil
+
+    loader = TestUtil.TestLoader()
+
+    suite = TestSuite()
+
+    #suite.addTest()
+
+    return suite

=== modified file '__init__.py'
--- a/__init__.py	2007-03-04 14:41:21 +0000
+++ b/__init__.py	2007-03-12 12:41:19 +0000
@@ -183,3 +183,10 @@
 except AttributeError:
     # Pre 0.15
     legacy = True
+
+def test_suite():
+    from unittest import TestSuite, TestLoader
+    import tests
+    suite = TestSuite()
+    suite.addTest(tests.test_suite())
+    return suite




More information about the bazaar-commits mailing list