[Zope3-checkins] CVS: Zope3/src/zope/tal/tests - test_talinterpreter.py:1.1.2.3

Fred L. Drake, Jr. fred@zope.com
Tue, 24 Dec 2002 10:35:08 -0500


Update of /cvs-repository/Zope3/src/zope/tal/tests
In directory cvs.zope.org:/tmp/cvs-serv29406

Modified Files:
      Tag: NameGeddon-branch
	test_talinterpreter.py 
Log Message:
update to current Zope 3 test style


=== Zope3/src/zope/tal/tests/test_talinterpreter.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/tal/tests/test_talinterpreter.py:1.1.2.2	Mon Dec 23 15:38:28 2002
+++ Zope3/src/zope/tal/tests/test_talinterpreter.py	Tue Dec 24 10:35:08 2002
@@ -52,10 +52,10 @@
         else:
             self.fail("Expected METALError")
 
-    def check_mode_error(self):
+    def test_mode_error(self):
         self.macro[1] = ("mode", "duh")
 
-    def check_version_error(self):
+    def test_version_error(self):
         self.macro[0] = ("version", "duh")
 
 
@@ -69,11 +69,11 @@
         else:
             self.fail(msg)
 
-    def check_id_with_replace(self):
+    def test_id_with_replace(self):
         self._check('<p i18n:id="foo" tal:replace="string:splat"></p>',
                     "expected i18n:id with tal:replace to be denied")
 
-    def check_missing_values(self):
+    def test_missing_values(self):
         self._check('<p i18n:attributes=""></p>',
                     "missing i18n:attributes value not caught")
         self._check('<p i18n:data=""></p>',
@@ -84,7 +84,7 @@
 
 class OutputPresentationTestCase(TestCaseBase):
 
-    def check_attribute_wrapping(self):
+    def test_attribute_wrapping(self):
         # To make sure the attribute-wrapping code is invoked, we have to
         # include at least one TAL/METAL attribute to avoid having the start
         # tag optimized into a rawtext instruction.
@@ -99,7 +99,7 @@
         </html>''' "\n"
         self.compare(INPUT, EXPECTED)
 
-    def check_entities(self):
+    def test_entities(self):
         INPUT = ('<img tal:define="foo nothing" '
                  'alt="&a; &#1; &#x0a; &a &#45 &; &#0a; <>" />')
         EXPECTED = ('<img alt="&a; &#1; &#x0a; '
@@ -113,13 +113,12 @@
         interp()
         self.assertEqual(sio.getvalue(), EXPECTED)
 
+
 def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(I18NErrorsTestCase, "check_"))
-    suite.addTest(unittest.makeSuite(MacroErrorsTestCase, "check_"))
-    suite.addTest(unittest.makeSuite(OutputPresentationTestCase, "check_"))
+    suite = unittest.makeSuite(I18NErrorsTestCase)
+    suite.addTest(unittest.makeSuite(MacroErrorsTestCase))
+    suite.addTest(unittest.makeSuite(OutputPresentationTestCase))
     return suite
-
 
 if __name__ == "__main__":
     errs = utils.run_suite(test_suite())