[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/PythonScripts/tests/testPythonScript.py
added some more tests for DateTime, Set classes
Andreas Jung
andreas at andreas-jung.com
Sat Jan 13 06:21:46 EST 2007
Log message for revision 71998:
added some more tests for DateTime, Set classes
Changed:
U Zope/trunk/lib/python/Products/PythonScripts/tests/testPythonScript.py
-=-
Modified: Zope/trunk/lib/python/Products/PythonScripts/tests/testPythonScript.py
===================================================================
--- Zope/trunk/lib/python/Products/PythonScripts/tests/testPythonScript.py 2007-01-13 10:54:44 UTC (rev 71997)
+++ Zope/trunk/lib/python/Products/PythonScripts/tests/testPythonScript.py 2007-01-13 11:21:45 UTC (rev 71998)
@@ -205,7 +205,15 @@
f = self._filePS('complex_print')
self.assertEqual(f.get_size(), len(f.read()))
+ def testSet(self):
+ res = self._newPS('return len(Set([1,2,3]))')()
+ self.assertEqual(res, 3)
+ def testDateTime(self):
+ res = self._newPS("return DateTime('2007/12/10').strftime('%d.%m.%Y')")()
+ self.assertEqual(res, '10.12.2007')
+
+
class TestPythonScriptErrors(PythonScriptTestBase):
def assertPSRaises(self, error, path=None, body=None):
More information about the Zope-Checkins
mailing list