[Zope3-Users] Interface tests: NotImplemented or NotImplementedError
Lorenzo Gil Sanchez
lgs at sicem.biz
Tue Oct 18 14:31:34 EDT 2005
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
More information about the Zope3-users
mailing list