[Zope-Checkins] CVS: Zope2 - restricted_module.py:1.7 testRestrictions.py:1.8

shane@digicool.com shane@digicool.com
Fri, 22 Jun 2001 14:32:49 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/RestrictedPython/tests
In directory korak.digicool.com:/tmp/cvs-serv6514

Modified Files:
	restricted_module.py testRestrictions.py 
Log Message:
Added a test that segfaulted with the incorrect stack handling in redirected
print statements, but now passes.



--- Updated File restricted_module.py in package Zope2 --
--- restricted_module.py	2001/06/21 17:45:14	1.6
+++ restricted_module.py	2001/06/22 18:32:48	1.7
@@ -8,6 +8,10 @@
     print 'world!',
     return printed
 
+def printStuff():
+    print 'a', 'b', 'c',
+    return printed
+
 def printToNone():
     x = None
     print >>x, 'Hello, world!',

--- Updated File testRestrictions.py in package Zope2 --
--- testRestrictions.py	2001/06/21 17:45:14	1.7
+++ testRestrictions.py	2001/06/22 18:32:48	1.8
@@ -182,6 +182,10 @@
         else:
             assert 0, res
 
+    def checkPrintStuff(self):
+        res = self.execFunc('printStuff')
+        assert res == 'a b c', res
+
     def checkPrintLines(self):
         res = self.execFunc('printLines')
         assert res == '0 1 2\n3 4 5\n6 7 8\n', res