[Zope-Checkins] CVS: Zope3 - ut.py:1.1.2.5
Chris Withers
chrisw@nipltd.com
Sat, 23 Feb 2002 09:30:19 -0500
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv1369
Modified Files:
Tag: Zope-3x-branch
ut.py
Log Message:
Nicer unit test template.
=== Zope3/ut.py 1.1.2.4 => 1.1.2.5 ===
"""
-import unittest, sys
+from unittest import TestCase, TestSuite, main, makeSuite
from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup
-class Test(CleanUp, unittest.TestCase):
+class Test(CleanUp, TestCase):
pass
def test_suite():
- loader=unittest.TestLoader()
- return loader.loadTestsFromTestCase(Test)
+ return TestSuite((
+ makeSuite(Test),
+ ))
if __name__=='__main__':
- unittest.TextTestRunner().run(test_suite())
+ main(defaultTest='test_suite')