[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 04:39:11 EDT 2006


yuppie wrote:
> Philipp von Weitershausen 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.
> 
> Tres did that already: http://www.zope.org/Collectors/Zope/2117

Excellent.

>>> 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.
> 
> I don't think this BBB issue has to be resolved in Zope. AFAICS
> global_vars is not part of the API and CMF used it just for unit test
> hacks.

Just looked at the code. You're right.

Philipp



More information about the Zope-CMF mailing list