[CMF-checkins] CVS: CMF/CMFCalendar/tests - test_all.py:1.8

Yvo Schubbe y.2004_ at wcm-solutions.de
Mon Apr 26 04:55:50 EDT 2004


Update of /cvs-repository/CMF/CMFCalendar/tests
In directory cvs.zope.org:/tmp/cvs-serv32349/CMFCalendar/tests

Modified Files:
	test_all.py 
Log Message:
- added optional 'suite_name' argument to build_test_suite()
- refactored all_cmf_tests and test_all to hide their test suites from other test runners
- added CMFActionIcons tests to all_cmf_tests
- removed pre Zope 2.6.4 compatibility code
- some whitespace, import and copyright cleanup


=== CMF/CMFCalendar/tests/test_all.py 1.7 => 1.8 ===
--- CMF/CMFCalendar/tests/test_all.py:1.7	Fri Jan  2 13:15:49 2004
+++ CMF/CMFCalendar/tests/test_all.py	Mon Apr 26 04:55:20 2004
@@ -1,19 +1,37 @@
-from unittest import main
+##############################################################################
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" CMFCalendar tests.
+
+$Id$
+"""
 
+from unittest import main
 import Testing
 import Zope
-try:
-    Zope.startup()
-except AttributeError:
-    # for Zope versions before 2.6.1
-    pass
+Zope.startup()
 
 from Products.CMFCore.tests.base.utils import build_test_suite
 
+
+def suite():
+    return build_test_suite('Products.CMFCalendar.tests',[
+        'test_Calendar',
+        'test_Event',
+        ])
+
 def test_suite():
-    return build_test_suite('Products.CMFCalendar.tests',
-                            ['test_Event',
-                             'test_Calendar'])
+    # Just to silence the top-level test.py
+    return None
 
 if __name__ == '__main__':
-    main(defaultTest='test_suite')
+    main(defaultTest='suite')




More information about the CMF-checkins mailing list