[issue9104] test_exceptions does not test pickling with pickle.py

Alexander Belopolsky report at bugs.python.org
Tue Jun 29 21:49:42 CEST 2010

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

> An explicit dictionary to map the Python and C implementations may be a 
> better approach.

Do you mean a global 

optimized_module = {'pickle': '_pickle'}

in test/support.py?

I don't think I like this idea.  Even with an explicit dictionary like that,  support.import_module_implementations() will not support all possible ways that alternative implementations of a given module may be provided in cpython.  It works for pickle/_pickle and heapq/_heapq, but won't work for io/_io/_pyio.  I would like import_module_implementations() to promote uniformity in the way parallel pure/native modules are designed.  Test suites for modules that want more flexibility can always call import_fresh_module() directly.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list