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

Stefan H. Holek stefan at epy.co.at
Tue Oct 17 06:48:21 EDT 2006


IIRC you need

     @classmethod
     def setUp(cls):
         pass

     @classmethod
     def tearDown(cls):
         pass


On 17. Okt 2006, at 12:30, Chris Withers wrote:

> 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?

--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams




More information about the Zope3-dev mailing list