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

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 8 16:05:19 EDT 2003


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

Modified Files:
      Tag: srichter-i18n-macro-interaction-branch
	test_talinterpreter.py 
Log Message:
Make sure the bar value is not a message id, which are always translated
anyways.


=== Zope3/src/zope/tal/tests/test_talinterpreter.py 1.3.4.8 => 1.3.4.9 ===
--- Zope3/src/zope/tal/tests/test_talinterpreter.py:1.3.4.8	Fri Aug  8 14:54:25 2003
+++ Zope3/src/zope/tal/tests/test_talinterpreter.py	Fri Aug  8 15:05:15 2003
@@ -64,6 +64,7 @@
     def _check(self, program, expected):
         self.engine = DummyEngine()
         self.engine.setLocal('foo', MessageID('FoOvAlUe', 'default'))
+        self.engine.setLocal('bar', 'BaRvAlUe')
         result = StringIO()
         self.interpreter = TALInterpreter(program, {}, self.engine,
                                           stream=result)
@@ -123,6 +124,7 @@
             '<span i18n:translate="" tal:content="foo" i18n:name="foo_name"/>')
 
     def test_content_with_plaintext_and_i18nname_and_i18ntranslate(self):
+        # Let's tell the user this is incredibly silly!
         self.assertRaises(
             I18NError, self._compile,
             '<span i18n:translate="" i18n:name="color_name">green</span>')
@@ -131,10 +133,10 @@
         # The follwoing code is also dumb; tell the user just that!
         program, macros = self._compile(
             '<div i18n:translate="">This is text for '
-            '<span i18n:translate="" tal:content="foo" '
+            '<span i18n:translate="" tal:content="bar" '
             'i18n:name="foo_name"/>.</div>')
         self._check(program,
-                    '<div>THIS IS TEXT FOR <span>FOOVALUE</span></div>\n')
+                    '<div>THIS IS TEXT FOR <span>BARVALUE</span></div>\n')
 
 
 class I18NErrorsTestCase(TestCaseBase):




More information about the Zope3-Checkins mailing list