[Zope-CMF] Re: SVN: CMF/trunk/CMFCore/ - fixed the unit tests that
failed on Zope 2.10
Philipp von Weitershausen
philipp at weitershausen.de
Thu Jun 1 03:48:28 EDT 2006
Yvo Schubbe wrote:
> Log message for revision 68396:
> - fixed the unit tests that failed on Zope 2.10
>
> (There is still one error, but that seems to be caused by a Zope bug.)
Please file collector entries so that we know and eventually fix them.
> +class Expression(Persistent):
>
> security = ClassSecurityInfo()
>
> def __init__(self, text):
> self.text = text
> - self._v_compiled = getEngine().compile(text)
> + if text:
> + self._v_compiled = getEngine().compile(text)
May I suggest to make this test more robust for superfluous whitespace?:
if test.strip():
self._v_compiled = getEngine().compile(text)
> def __call__(self, econtext):
> + if not self.text:
> + return ''
Same here...
> Modified: CMF/trunk/CMFCore/tests/test_Expression.py
> ===================================================================
> --- CMF/trunk/CMFCore/tests/test_Expression.py 2006-05-30 16:10:52 UTC (rev 68395)
> +++ CMF/trunk/CMFCore/tests/test_Expression.py 2006-05-30 16:18:49 UTC (rev 68396)
> @@ -49,21 +49,34 @@
> def test_anonymous_ec(self):
> self.portal.portal_membership = DummyMembershipTool()
> ec = createExprContext(self.folder, self.portal, self.object)
> - member = ec.global_vars['member']
> + if hasattr(ec, 'contexts'):
> + member = ec.contexts['member']
> + else:
> + # BBB: for Zope 2.9
> + member = ec.global_vars['member']
Please file a collector issue for this BBB problem.
Thanks
Philipp
More information about the Zope-CMF
mailing list