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

Eli Bendersky report at bugs.python.org
Wed Feb 6 14:19:18 CET 2013


Eli Bendersky added the comment:

On Wed, Feb 6, 2013 at 4:17 AM, Ezio Melotti <report at bugs.python.org> wrote:

>
> Ezio Melotti added the comment:
>
> I'm still a bit skeptic about this.
>
> To summarize my position, I am:
> +0 about adding something like this to test.support and use it for new
> tests;
> -1 about mass-rewriting the existing tests to use this (in particular for
> test_json);
> +1 about simplifying the API of import_fresh_module so that it returns
> both the modules and doesn't require the fresh/blocked args;
>

I share Ezio's sentiment regarding the new proposal(s). As for
import_fresh_module, if it's only ever used to do what we describe here,
then I propose to rename it to something more descriptive and indeed make
it just return both modules. If it's being used for other stuff, we can add
another function and rewrite all the tests to use that.

py_module, c_module = import_python_module_and_accelerator('module',
'_module')

----------

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


More information about the Python-bugs-list mailing list