Re: [Zope3-Users] Interface tests: NotImplemented or NotImplementedError
On Tuesday 18 October 2005 14:37, Jim Fulton wrote: > FWIW, I consider interface tests to be a sucessful failure. > They were worth trying but are not really worth the bother > most of the time. IMO, you should only consider them in a > case where you have an interface that you expect many implementations > of and you want to reuse tests accross the implementations. Even then, > there's a danger that the necessary infrastructure to allow reuse will make > the tests unfathomable. Unfortunately I have to agree. Lorenzo, sorry for the confusion. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Interface tests: NotImplemented or NotImplementedError
FWIW, I consider interface tests to be a sucessful failure. They were worth trying but are not really worth the bother most of the time. IMO, you should only consider them in a case where you have an interface that you expect many implementations of and you want to reuse tests accross the implementations. Even then, there's a danger that the necessary infrastructure to allow reuse will make the tests unfathomable. Jim Lorenzo Gil Sanchez wrote: Hi everybody, while writing my first interface test I got to the point of writing the makeTestObject method which should raise a not implemented error (so implementations of this interace should override it) In the Zope 3 book the method is like this: def makeTestObject(self): raise NotImplemented() but after playing a bit with the Python interpreter it says that NotImplemented is not callable neither an exception. Looking in some real zope3 tests I saw another version of the method: def makeTestObject(self): raise NotImplementedError() So I guess is a little bug in the Zope3 book. Or, Am I missing something? Regards Lorenzo Gil Sanchez ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users