[Zope3-checkins] CVS: Zope3 - ut.py:1.5
Barry Warsaw
barry@wooz.org
Fri, 20 Dec 2002 14:35:41 -0500
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv12123
Modified Files:
ut.py
Log Message:
Some better templates
=== Zope3/ut.py 1.4 => 1.5 ===
--- Zope3/ut.py:1.4 Tue Aug 13 16:28:35 2002
+++ Zope3/ut.py Fri Dec 20 14:35:40 2002
@@ -34,12 +34,29 @@
#############################################################################
class Test(TestCase):
- pass
+ def setUp(self):
+ # Set up some preconditions
+ pass
+
+ def tearDown(self):
+ # Clean up after each test
+ pass
+
+ def test_something(self):
+ # This tests something. Unittest style guidelines:
+ # - never put anything in the test method's docstring, since it makes
+ # it harder to find this test when verbose output is used. Use a
+ # comment instead.
+ # - Call your test method "test_<something>", never
+ # "check_<something>". The "test" prefix is a unittest default.
+ pass
+
def test_suite():
- return TestSuite((
- makeSuite(Test),
- ))
+ suite = unittest.TestSuite()
+ suite.addTest(unttest.makeSuite(Test))
+ return suite
+
-if __name__=='__main__':
- main(defaultTest='test_suite')
+if __name__ == '__main__':
+ unittest.main()