[Zope-CVS] CVS: Products/CompositePage/tests - test_composite.py:1.5
Shane Hathaway
shane at zope.com
Thu Apr 15 18:04:33 EDT 2004
Update of /cvs-repository/Products/CompositePage/tests
In directory cvs.zope.org:/tmp/cvs-serv7482
Modified Files:
test_composite.py
Log Message:
Corrected tests for Zope 2.6 and Python 2.1. Python 2.1 uses different variable scope rules and Zope 2.6 traps page template errors.
=== Products/CompositePage/tests/test_composite.py 1.4 => 1.5 ===
--- Products/CompositePage/tests/test_composite.py:1.4 Tue Apr 13 15:12:04 2004
+++ Products/CompositePage/tests/test_composite.py Thu Apr 15 18:04:33 2004
@@ -48,7 +48,7 @@
def setUp(self):
f = Folder()
f.getPhysicalPath = lambda: ()
- f.getPhysicalRoot = lambda: f
+ f.getPhysicalRoot = lambda f=f: f
f.composite = Composite()
f.composite._setId("composite")
t = ZopePageTemplate(
@@ -117,7 +117,9 @@
except TALError, e:
msg = str(e)
else:
- raise AssertionError("Expected a syntax error")
+ msg = ' '.join(t.pt_errors())
+ if not msg:
+ raise AssertionError("Expected a syntax error")
substr = "near ' b'"
self.assert_(msg.find(substr) >= 0)
More information about the Zope-CVS
mailing list