[Zope3-dev] layers can't be new style classes?

Jim Fulton jim at zope.com
Tue Oct 17 08:29:47 EDT 2006


Jim Fulton wrote:
> Chris Withers wrote:
>> Hi All,
>>
>> It would appear that Philipp's article is somewhat misleading in that 
>> layers can't be new style classes...
>>
>> class MyLayer(object):
>>
>>    def setUp(self): pass
>>
>>    def tearDown(self): pass
>>
>> ..results in the following when used as a layer:
>>
>> AttributeError: type object 'object' has no attribute 'setUp'
>>
>> Is this a bug in Philipp's article or in the testrunner?
> 
> In Philipp's article.

I may have spoken too soon.  It looks like there is code to
handle the object-as-base case in the test runner, at least on the trunk.
Perhaps the version used by zope3 doesn't handle this case, or
perhaps there's a bug that needs to be pursued.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list