[Zope-Checkins] CVS: Zope2 - testPythonScript.py:1.4.16.1
shane@digicool.com
shane@digicool.com
Mon, 2 Jul 2001 14:13:42 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Products/PythonScripts/tests
In directory korak.digicool.com:/tmp/cvs-serv31121/tests
Modified Files:
Tag: Zope-2_4-branch
testPythonScript.py
Log Message:
Collector #2334. Scripts that ended with indentation failed to compile.
--- Updated File testPythonScript.py in package Zope2 --
--- testPythonScript.py 2001/04/27 20:27:44 1.4
+++ testPythonScript.py 2001/07/02 18:13:41 1.4.16.1
@@ -121,6 +121,11 @@
empty = self._newPS('')()
assert empty is None, empty
+ def testIndented(self):
+ # This failed to compile in Zope 2.4.0b2.
+ res = self._newPS('if 1:\n return 2')()
+ assert res == 2, res
+
def testReturn(self):
return1 = self._newPS('return 1')()
assert return1 == 1, return1