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

Nick Coghlan <ncoghlan@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.