[CMF-checkins] CVS: CMF - __init__.py:1.2 test_all.py:1.4
tseaver@digicool.com
tseaver@digicool.com
Sat, 2 Jun 2001 00:20:23 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/tests
In directory korak.digicool.com:/tmp/cvs-serv28882/CMFDefault/tests
Modified Files:
__init__.py test_all.py
Log Message:
- Clean up the 'test_all' architecture:
o use JUnitTextTestRunner;
o implement 'test_suite' protocol, to permit federation by a
smarter test builder.
--- Updated File __init__.py in package CMF --
--- __init__.py 2001/03/29 15:59:25 1.1
+++ __init__.py 2001/06/02 04:19:52 1.2
@@ -2,5 +2,5 @@
Unit test package for CMFDefault.
As test suites are added, they should be added to the
-mega-test-suite in test_AllCMFDefault.py
+mega-test-suite in Products.CMFDefault.test_all.py
"""
--- Updated File test_all.py in package CMF --
--- test_all.py 2001/05/23 17:00:44 1.3
+++ test_all.py 2001/06/02 04:19:52 1.4
@@ -1,23 +1,23 @@
import unittest
+from Products.CMFDefault.tests import test_Discussions
from Products.CMFDefault.tests import test_Document
from Products.CMFDefault.tests import test_NewsItem
from Products.CMFDefault.tests import test_Image
from Products.CMFDefault.tests import test_MetadataTool
from Products.CMFDefault.tests import test_utils
-def main():
- """\
- Combines all of the test suites in this package into a single
- large test.
- """
- suite = unittest.TestSuite((
- test_Document.test_suite(),
- test_NewsItem.test_suite(),
- test_Image.test_suite(),
- test_MetadataTool.test_suite(),
- test_utils.test_suite(),
- ))
- unittest.TextTestRunner().run(suite)
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest( test_Discussions.test_suite() )
+ suite.addTest( test_Document.test_suite() )
+ suite.addTest( test_NewsItem.test_suite() )
+ suite.addTest( test_Image.test_suite() )
+ suite.addTest( test_MetadataTool.test_suite() )
+ suite.addTest( test_utils.test_suite() )
+ return suite
+def run():
+ unittest.JUnitTextTestRunner().run(test_suite())
+
if __name__ == '__main__':
- main()
+ run()