Author chris.jerdonek
Recipients brett.cannon, chris.jerdonek, ezio.melotti, zach.ware
Date 2013-01-25.10:58:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359111490.95.0.558972457048.issue16968@psf.upfronthosting.co.za>
In-reply-to
Content
I looked into this a bit.  It seems like this is because with the patch, the call to "loader.loadTestsFromModule(the_module)" inside regrtest comes before the try-finally:

http://hg.python.org/cpython/file/fcdb35b114ab/Lib/test/regrtest.py#l1277

whereas with the current code, the analogous test-loading code is part of test.support.run_unittest() and so is protected by the try-finally inside test_main().  Apparently, simply discovering/loading tests from test_concurrent_futures.py is enough to modify threading._dangling (e.g. when finding the tests to pass to load_tests).

I'm not sure yet what the right solution is, but it doesn't seem like test discovery should have that side effect.  It could be because of how test_concurrent_futures is written, or because of certain initialization code in one of the modules it depends on.
History
Date User Action Args
2013-01-25 10:58:11chris.jerdoneksetrecipients: + chris.jerdonek, brett.cannon, ezio.melotti, zach.ware
2013-01-25 10:58:10chris.jerdoneksetmessageid: <1359111490.95.0.558972457048.issue16968@psf.upfronthosting.co.za>
2013-01-25 10:58:10chris.jerdoneklinkissue16968 messages
2013-01-25 10:58:10chris.jerdonekcreate