[Zope3-checkins] CVS: Zope3/src/zope/security/tests -
test_interpreter.py:1.4
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Aug 21 10:13:34 EDT 2003
Update of /cvs-repository/Zope3/src/zope/security/tests
In directory cvs.zope.org:/tmp/cvs-serv29834/src/zope/security/tests
Modified Files:
test_interpreter.py
Log Message:
Fixed a bug in Templated Page (due to my changes)
Added global versus local veriable test for zope.security.interpreter
Added a couple of HTMLTALParser tests.
=== Zope3/src/zope/security/tests/test_interpreter.py 1.3 => 1.4 ===
--- Zope3/src/zope/security/tests/test_interpreter.py:1.3 Wed Apr 30 19:38:00 2003
+++ Zope3/src/zope/security/tests/test_interpreter.py Thu Aug 21 09:13:03 2003
@@ -52,6 +52,19 @@
)
self.rinterp.ri_exec(code)
+ def testGlobalVersusLocal(self):
+ code = ("global x\n"
+ "x = 1\n"
+ "y = 2\n")
+ self.rinterp.ri_exec(code)
+ self.assert_('x' in self.rinterp.globals)
+ self.assert_('y' not in self.rinterp.globals)
+ self.assertEqual(self.rinterp.globals['x'], 1)
+ self.assert_('x' not in self.rinterp.locals)
+ self.assert_('y' in self.rinterp.locals)
+ self.assertEqual(self.rinterp.locals['y'], 2)
+
+
def test_suite():
return unittest.makeSuite(RITests)
More information about the Zope3-Checkins
mailing list