[CMF-checkins] CVS: CMF - test_all.py:1.2

tseaver@digicool.com tseaver@digicool.com
Sat, 2 Jun 2001 00:20:22 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore/tests
In directory korak.digicool.com:/tmp/cvs-serv28882/CMFCore/tests

Modified Files:
	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 test_all.py in package CMF --
--- test_all.py	2001/06/02 03:45:02	1.1
+++ test_all.py	2001/06/02 04:19:51	1.2
@@ -2,17 +2,14 @@
 from Products.CMFCore.tests import test_ContentTypeRegistry
 from Products.CMFCore.tests import test_PortalFolder
 
-def main():
-    """\
-    Combines all of the test suites in this package into a single
-    large test.
-    """
-    suite = unittest.TestSuite((
-        test_ContentTypeRegistry.test_suite(),
-        test_PortalFolder.test_suite(),
-        ))
-    unittest.TextTestRunner().run(suite)
+def test_suite():
+    suite = unittest.TestSuite()
+    suite.addTest( test_ContentTypeRegistry.test_suite() )
+    suite.addTest( test_PortalFolder.test_suite() )
+    return suite
 
-if __name__ == '__main__':
-    main()
+def run():
+    unittest.JUnitTextTestRunner().run(test_suite())
 
+if __name__ == '__main__':
+    run()