[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

Brett Cannon report at bugs.python.org
Thu Feb 7 19:20:42 CET 2013


Brett Cannon added the comment:

At this point let's just start with the helper class which takes the arguments as necessary to do the proper importing of both the pure Python and accelerated versions of the module and optionally the name of the attribute the test classes expect (otherwise just use the name of the module itself). Then expose two decorator methods to use on subclasses to set the proper class with the proper attribute name. Going fancier with a method that generates the subclasses can come in a separate patch. import_fresh_module() can stay as-is and this class just becomes the preferred way to get both versions of a module at the same time.

----------

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


More information about the Python-bugs-list mailing list