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

Guido van Rossum guido@python.org
Wed, 04 Jun 2003 11:21:42 -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?

The latter.  The __dict__ attribute of a class returns a read-only
proxy for the real dict.

--Guido van Rossum (home page: http://www.python.org/~guido/)