Zachary Ware added the comment: 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. ---------- Added file: http://bugs.python.org/file28881/test_concurrent_futures_discovery.v3.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16968> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com