[Zope3-dev] test failure in checkClassInfo with Python 2.3

Phillip J. Eby pje@telecommunity.com
Wed, 04 Jun 2003 09:38:29 -0400


At 04:06 PM 6/4/03 +0300, Steve Alexander wrote:
>Guido van Rossum wrote:
>>With Python 2.3, I get a test failure for checkClassInfo:
>>======================================================================
>>FAIL: checkClassInfo (zope.interface.tests.test_advice.FrameInfoTest)
>>----------------------------------------------------------------------
>>Traceback (most recent call last):
>>   File 
>> "/home/guido/projects/zope3/src/zope/interface/tests/test_advice.py", 
>> line 59, in checkClassInfo
>>     assert f_locals is self.__class__.__dict__  # ???
>>AssertionError
>>The same test passes with Python 2.2.
>
>Thanks. I'll look into this.

Hmmm...  is TestCase a new-style class in 2.3?  Or do classic classes no 
longer use the dictionary returned by the class suite as their __dict__ in 2.3?

If the issue is that TestCase is a new-style class in 2.3, the solution 
would be to move the 'classLevelFrameInfo' assignment to a classic class, 
and change the assert accordingly.  If the issue is that classic classes 
don't use the suite locals as their __dict__ any more, then there is no 
longer a way to test that getFrameInfo() is returning the locals of a class 
suite.
:(