[issue9731] ABCMeta.register should verify that methods are present

Guido van Rossum report at bugs.python.org
Wed Sep 1 17:16:27 CEST 2010


Guido van Rossum <guido at python.org> added the comment:

> Would it be useful to provide a separate function to perform the check, which could be used by lint-style tools as well as automated tests?
>
> It would be great if every call to .register in the standard library had a corresponding test that verified that the appropriate methods were defined.  That would prevent future oversights where methods are missing entirely.

Yeah, that makes sense. You could put those checks in the unittests.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9731>
_______________________________________


More information about the Python-bugs-list mailing list