[Zope-Checkins] CVS: Zope/lib/python/Products/PythonScripts/tests - testPythonScript.py:1.13
Fred L. Drake, Jr.
fred@zope.com
Wed, 9 Jul 2003 12:25:42 -0400
Update of /cvs-repository/Zope/lib/python/Products/PythonScripts/tests
In directory cvs.zope.org:/tmp/cvs-serv12488/Products/PythonScripts/tests
Modified Files:
testPythonScript.py
Log Message:
Replace apply(f,args,kw) with f(*args,**kw) to avoid deprecation warnings
from Python 2.3.
These warnings are displayed when running the unit tests.
This patch fixes the occurrances that are triggered by the unit tests;
there are probably others.
=== Zope/lib/python/Products/PythonScripts/tests/testPythonScript.py 1.12 => 1.13 ===
--- Zope/lib/python/Products/PythonScripts/tests/testPythonScript.py:1.12 Wed Aug 14 18:25:09 2002
+++ Zope/lib/python/Products/PythonScripts/tests/testPythonScript.py Wed Jul 9 12:25:07 2003
@@ -81,9 +81,9 @@
def testParam26(self):
import string
params = string.letters[:26]
- sparams = string.join(params, ',')
- tup = apply(self._newPS('##parameters=%s\nreturn %s'
- % (sparams,sparams)), params)
+ sparams = ','.join(params)
+ ps = self._newPS('##parameters=%s\nreturn %s' % (sparams, sparams))
+ tup = ps(*params)
assert tup == tuple(params), (tup, params)
def testArithmetic(self):