[CMF-checkins] CVS: CMF - all_cmf_tests.py:1.10
Yvo Schubbe
y.2004_ at wcm-solutions.de
Mon Apr 26 04:55:54 EDT 2004
Update of /cvs-repository/CMF
In directory cvs.zope.org:/tmp/cvs-serv32349
Modified Files:
all_cmf_tests.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/all_cmf_tests.py 1.9 => 1.10 ===
--- CMF/all_cmf_tests.py:1.9 Sun Jan 18 13:38:20 2004
+++ CMF/all_cmf_tests.py Mon Apr 26 04:55:24 2004
@@ -1,29 +1,46 @@
-#! /usr/bin/env python
+#!/usr/bin/env python
+
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+""" CMF tests.
+
+$Id$
+"""
+
import unittest
+import Testing
+import Zope
+Zope.startup()
+
+import getopt
import sys
+from Products.CMFCore.tests.base.utils import build_test_suite
+
+
# PackageName Required?
-CMF_PACKAGES = [ ( 'CMFCore', 1 )
- , ( 'CMFDefault', 1 )
- , ( 'CMFTopic', 1 )
- , ( 'CMFCalendar', 0 )
- , ( 'DCWorkflow', 1 )
+CMF_PACKAGES = [ ( 'CMFCore', 1 )
+ , ( 'CMFDefault', 1 )
+ , ( 'CMFTopic', 1 )
+ , ( 'CMFCalendar', 0 )
+ , ( 'CMFActionIcons', 0 )
+ , ( 'DCWorkflow', 1 )
]
PACKAGES_UNDER_TEST = []
def test_suite():
- import Testing
- import Zope
-
- try:
- Zope.startup()
- except AttributeError: # Zope <= 2.6.0
- pass
-
- from Products.CMFCore.tests.base.utils import build_test_suite
-
suite = unittest.TestSuite()
packages = PACKAGES_UNDER_TEST or CMF_PACKAGES
@@ -33,6 +50,7 @@
suite.addTest( build_test_suite( dotted
, [ 'test_all' ]
, required=required
+ , suite_name='suite'
) )
return suite
@@ -53,8 +71,6 @@
def main():
- import getopt
-
try:
opts, args = getopt.getopt( sys.argv[1:], 'vq?' )
except getopt.GetoptError:
@@ -76,6 +92,6 @@
unittest.main(defaultTest='test_suite')
-if __name__ == '__main__':
+if __name__ == '__main__':
main()
More information about the CMF-checkins
mailing list