This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients brett.cannon, chris.jerdonek, ezio.melotti, zach.ware
Date 2013-01-28.15:29:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359386980.88.0.032556908403.issue16968@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you, Chris.  I'm rather ashamed of how long I've spent beating my head on this issue and missed the spare tests reference in runtest_inner.

Simply removing the "tests" name entirely clears things up, if this isn't too ugly:

diff -r 5f655369ef06 Lib/test/regrtest.py
--- a/Lib/test/regrtest.py      Mon Jan 28 13:27:02 2013 +0200
+++ b/Lib/test/regrtest.py      Mon Jan 28 08:50:59 2013 -0600
@@ -1275,8 +1275,8 @@
             # tests.  If not, use normal unittest test loading.
             test_runner = getattr(the_module, "test_main", None)
             if test_runner is None:
-                tests = unittest.TestLoader().loadTestsFromModule(the_module)
-                test_runner = lambda: support.run_unittest(tests)
+                test_runner = lambda: support.run_unittest(
+                        unittest.TestLoader().loadTestsFromModule(the_module))
             test_runner()
             if huntrleaks:
                 refleak = dash_R(the_module, test, test_runner,

As far as the reap_threads wrapper and reap_children follow-up, I think the TestSuite subclass and load_tests function in the last patch I uploaded may be about the simplest way to keep them for this test without adding them to all tests (by adding it to regrtest.runtest_inner).  If anyone thinks the 'ReapedSuite' class (or a better named copy) could be useful elsewhere, it might could go in test.support which would make test_concurrent_futures look a little cleaner.

Patch v3 is v2 plus the regrtest change inline above.
History
Date User Action Args
2013-01-28 15:29:40zach.waresetrecipients: + zach.ware, brett.cannon, ezio.melotti, chris.jerdonek
2013-01-28 15:29:40zach.waresetmessageid: <1359386980.88.0.032556908403.issue16968@psf.upfronthosting.co.za>
2013-01-28 15:29:40zach.warelinkissue16968 messages
2013-01-28 15:29:40zach.warecreate