[Zope3-checkins] CVS: Zope3/src/zope/tal/tests -
test_talinterpreter.py:1.3.6.5
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Aug 21 01:02:19 EDT 2003
Update of /cvs-repository/Zope3/src/zope/tal/tests
In directory cvs.zope.org:/tmp/cvs-serv3254/tal/tests
Modified Files:
Tag: srichter-inlinepython-branch
test_talinterpreter.py
Log Message:
Wrote tests for the interpreter service and the PythonInterpreter.
Fixed bug in secure interpreter in zope.security.
Removed some tests from test_talinterpreter, since it really tested Python
stuff, not TAL specific functionality.
=== Zope3/src/zope/tal/tests/test_talinterpreter.py 1.3.6.4 => 1.3.6.5 ===
--- Zope3/src/zope/tal/tests/test_talinterpreter.py:1.3.6.4 Wed Aug 20 16:50:48 2003
+++ Zope3/src/zope/tal/tests/test_talinterpreter.py Thu Aug 21 00:02:18 2003
@@ -76,56 +76,6 @@
'<p tal:script="text/server-python">print "hello"</p>')
self._check(program, '<p>hello\n</p>\n')
- def test_indent(self):
- program, macros = self._compile(
- '<p tal:script="text/server-python">\n'
- ' print "hello"\n'
- '</p>')
- self._check(program, '<p>hello\n</p>\n')
-
- def test_multiline(self):
- program, macros = self._compile(
- '<p tal:script="text/server-python">\n'
- ' print "hello"\n'
- ' print "world"\n'
- '</p>')
- self._check(program, '<p>hello\nworld\n</p>\n')
-
- def test_variable_assignment(self):
- program, macros = self._compile(
- '<p tal:script="text/server-python">\n'
- ' x = 1\n'
- ' print x'
- '</p>')
- self._check(program, '<p>1\n</p>\n')
-
- def test_local_variable_assignment(self):
- program, macros = self._compile(
- '<p tal:script="text/server-python">\n'
- ' x = 1\n'
- '</p>')
- self._check(program, '<p></p>\n')
- self.assertEqual(self.engine.codeLocals['x'], 1)
-
- def test_global_variable_assignment(self):
- program, macros = self._compile(
- '<p tal:script="text/server-python">\n'
- ' global x\n'
- ' x = 1\n'
- '</p>')
- self._check(program, '<p></p>\n')
- self.assertEqual(self.engine.codeGlobals['x'], 1)
-
- def test_use_global_variables_outside(self):
- program, macros = self._compile(
- '<p tal:script="text/server-python">\n'
- ' global x\n'
- ' x = 1\n'
- '</p>\n'
- '<span tal:replace="x" />')
- self._check(program, '<p></p>\n1\n')
- self.assertEqual(self.engine.codeGlobals['x'], 1)
-
def test_script_and_tal_block(self):
program, macros = self._compile(
'<tal:block script="text/server-python">\n'
More information about the Zope3-Checkins
mailing list