[issue5354] Add test.support.import_python_only

Brett Cannon report at bugs.python.org
Sat Apr 11 21:36:32 CEST 2009


Brett Cannon <brett at python.org> added the comment:

On Sat, Apr 11, 2009 at 07:28, Nick Coghlan <report at bugs.python.org> wrote:

>
> Nick Coghlan <ncoghlan at gmail.com> added the comment:
>
> Implemented for 2.7 in r71465
> Implemented for 3.1 in r7146
>

Style nit: why the extra check for block_names being None to later set it to
an empty tuple? Why not make the default argument the empty tuple?

>
> Leaving issue open for the moment - the 3.1 test_warnings fails if I
> don't get a fresh copy of _warnings before running the unit tests. I
> want to figure out why that is necessary before closing the issue.

Might have to do with _warnings trying to import warnings for certain things
in certain cases.

And just something I thought about, Nick, is possibly coming up with a class
decorator that sets self.module on the class. This could have the perk of
taking an optional argument that checks if the optimized module is even in
existence so as to skip running the tests twice if it is not needed. Then
again this might over-optimizing and best to just let the tests run twice
even if it is not needed.

----------
Added file: http://bugs.python.org/file13675/unnamed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5354>
_______________________________________
-------------- next part --------------
<br><br><div class="gmail_quote">On Sat, Apr 11, 2009 at 07:28, Nick Coghlan <span dir="ltr">&lt;<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Nick Coghlan &lt;<a href="mailto:ncoghlan at gmail.com">ncoghlan at gmail.com</a>&gt; added the comment:<br>
<br>
Implemented for 2.7 in r71465<br>
Implemented for 3.1 in r7146<br>
</blockquote><div><br>Style nit: why the extra check for block_names being None to later set it to an empty tuple? Why not make the default argument the empty tuple?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Leaving issue open for the moment - the 3.1 test_warnings fails if I<br>
don&#39;t get a fresh copy of _warnings before running the unit tests. I<br>
want to figure out why that is necessary before closing the issue.</blockquote><div><br>Might have to do with _warnings trying to import warnings for certain things in certain cases.<br><br>And just something I thought about, Nick, is possibly coming up with a class decorator that sets self.module on the class. This could have the perk of taking an optional argument that checks if the optimized module is even in existence so as to skip running the tests twice if it is not needed. Then again this might over-optimizing and best to just let the tests run twice even if it is not needed.<br>

</div></div>


More information about the Python-bugs-list mailing list