[CMF-checkins] CVS: CMF/CMFCore/tests - test_FSPageTemplate.py:1.2.4.2
Shane Hathaway
shane@cvs.zope.org
Thu, 4 Apr 2002 11:58:33 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv5742
Modified Files:
Tag: cmf-pre-1_3-branch
test_FSPageTemplate.py
Log Message:
A bad template can raise either an Undefined or a KeyError, depending on
the version of Zope. The Undefined error masks the real KeyError, but only
the Zope CVS trunk currently raises the proper KeyError.
=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.2.4.1 => 1.2.4.2 ===
script = FSPageTemplate('testPT', join(skin_path_name,'testPTbad.pt'))
script = script.__of__(root)
- self.assertRaises(Undefined,script)
+ try:
+ script()
+ except (Undefined, KeyError):
+ pass
+ else:
+ self.fail('Calling a bad template did not raise an exception')
def test_suite():
return TestSuite((