[CMF-checkins] CVS: CMF/CMFTopic/tests - test_all.py:1.5
Chris Withers
chrisw@nipltd.com
Fri, 15 Feb 2002 14:46:05 -0500
Update of /cvs-repository/CMF/CMFTopic/tests
In directory cvs.zope.org:/tmp/cvs-serv10707/CMFTopic/tests
Modified Files:
test_all.py
Log Message:
The unit tests hopefully smell better now. Please try and keep them this way. Look in CMFCore/tests/base for commonly used artifacts.
=== CMF/CMFTopic/tests/test_all.py 1.4 => 1.5 ===
-import unittest
-
-from Products.CMFTopic.tests import test_Topic
-from Products.CMFTopic.tests import test_DateC
-from Products.CMFTopic.tests import test_ListC
-from Products.CMFTopic.tests import test_SIC
-from Products.CMFTopic.tests import test_SSC
+from unittest import main
+from Products.CMFCore.tests.base.utils import build_test_suite
def test_suite():
- suite = unittest.TestSuite()
- suite.addTest( test_Topic.test_suite() )
- suite.addTest( test_DateC.test_suite() )
- suite.addTest( test_ListC.test_suite() )
- suite.addTest( test_SIC.test_suite() )
- suite.addTest( test_SSC.test_suite() )
- return suite
-def run():
- if hasattr( unittest, 'JUnitTextTestRunner' ):
- unittest.JUnitTextTestRunner().run( test_suite() )
- else:
- unittest.TextTestRunner( verbosity=0 ).run( test_suite() )
+ return build_test_suite('Products.CMFTopic.tests',[
+ 'test_Topic',
+ 'test_DateC',
+ 'test_ListC',
+ 'test_SIC',
+ 'test_SSC',
+ ])
if __name__ == '__main__':
- run()
+ main(defaultTest='test_suite')