[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate/tests - simpletestview.py:1.1.2.3 test_boundpagetemplate.py:1.1.2.2 test_viewzpt.py:1.1.2.3 test_zopepythonexpr.py:1.1.2.2
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:40 -0500
Update of /cvs-repository/Zope3/src/zope/app/pagetemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/pagetemplate/tests
Modified Files:
Tag: NameGeddon-branch
simpletestview.py test_boundpagetemplate.py test_viewzpt.py
test_zopepythonexpr.py
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py. The
files are fixed-points of that script now. Fixed a few cases where
code relied on significant trailing whitespace (ouch).
=== Zope3/src/zope/app/pagetemplate/tests/simpletestview.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/pagetemplate/tests/simpletestview.py:1.1.2.2 Mon Dec 23 17:34:19 2002
+++ Zope3/src/zope/app/pagetemplate/tests/simpletestview.py Tue Dec 24 21:20:39 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
=== Zope3/src/zope/app/pagetemplate/tests/test_boundpagetemplate.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/pagetemplate/tests/test_boundpagetemplate.py:1.1.2.1 Mon Dec 23 14:31:57 2002
+++ Zope3/src/zope/app/pagetemplate/tests/test_boundpagetemplate.py Tue Dec 24 21:20:39 2002
@@ -2,17 +2,17 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
import unittest, sys, os
-
+
class Test(unittest.TestCase):
=== Zope3/src/zope/app/pagetemplate/tests/test_viewzpt.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/pagetemplate/tests/test_viewzpt.py:1.1.2.2 Mon Dec 23 17:34:19 2002
+++ Zope3/src/zope/app/pagetemplate/tests/test_viewzpt.py Tue Dec 24 21:20:39 2002
@@ -39,9 +39,9 @@
class TestViewZPT(PlacefulSetup, unittest.TestCase):
def setUp(self):
- PlacefulSetup.setUp(self)
- self.t = ViewPageTemplateFile('test.pt')
- self.context = C1()
+ PlacefulSetup.setUp(self)
+ self.t = ViewPageTemplateFile('test.pt')
+ self.context = C1()
def checkNamespaceContextAvailable(self):
=== Zope3/src/zope/app/pagetemplate/tests/test_zopepythonexpr.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/pagetemplate/tests/test_zopepythonexpr.py:1.1.2.1 Mon Dec 23 14:31:57 2002
+++ Zope3/src/zope/app/pagetemplate/tests/test_zopepythonexpr.py Tue Dec 24 21:20:39 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""
@@ -34,20 +34,20 @@
class Test(CleanUp, TestCase):
- def test(self):
- from zope.app.pagetemplate.engine import ZopePythonExpr
- from zope.exceptions import Forbidden
-
- expr = ZopePythonExpr('python', 'max(a,b)', Engine())
- self.assertEqual(expr(Context(a=1, b=2)), 2)
- expr = ZopePythonExpr(
- 'python', '__import__("sys").__name__', Engine())
- self.assertEqual(expr(Context()), 'sys')
- expr = ZopePythonExpr('python', '__import__("sys").exit',
- Engine())
- self.assertRaises(Forbidden, expr, Context())
- expr = ZopePythonExpr('python', 'open("x", "w")', Engine())
- self.assertRaises(NameError, expr, Context())
+ def test(self):
+ from zope.app.pagetemplate.engine import ZopePythonExpr
+ from zope.exceptions import Forbidden
+
+ expr = ZopePythonExpr('python', 'max(a,b)', Engine())
+ self.assertEqual(expr(Context(a=1, b=2)), 2)
+ expr = ZopePythonExpr(
+ 'python', '__import__("sys").__name__', Engine())
+ self.assertEqual(expr(Context()), 'sys')
+ expr = ZopePythonExpr('python', '__import__("sys").exit',
+ Engine())
+ self.assertRaises(Forbidden, expr, Context())
+ expr = ZopePythonExpr('python', 'open("x", "w")', Engine())
+ self.assertRaises(NameError, expr, Context())
def test_suite():
return makeSuite(Test)