changeset: 91995:7bc53cf8b2df parent: 91993:944fc499ccd3 parent: 91994:9bca86812857 user: Zachary Ware date: Mon Aug 04 11:18:23 2014 -0500 files: Misc/NEWS description: Closes #22104: Merge with 3.4 diff -r 944fc499ccd3 -r 7bc53cf8b2df Lib/test/regrtest.py --- a/Lib/test/regrtest.py Mon Aug 04 17:17:21 2014 +0300 +++ b/Lib/test/regrtest.py Mon Aug 04 11:18:23 2014 -0500 @@ -1273,8 +1273,10 @@ # 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) + def test_runner(): + loader = unittest.TestLoader() + tests = loader.loadTestsFromModule(the_module) + support.run_unittest(tests) test_runner() if huntrleaks: refleak = dash_R(the_module, test, test_runner, huntrleaks) diff -r 944fc499ccd3 -r 7bc53cf8b2df Misc/NEWS --- a/Misc/NEWS Mon Aug 04 17:17:21 2014 +0300 +++ b/Misc/NEWS Mon Aug 04 11:18:23 2014 -0500 @@ -802,6 +802,9 @@ Tests ----- +- Issue #22104: regrtest.py no longer holds a reference to the suite of tests + loaded from test modules that don't define test_main(). + - Issue #22111: Assorted cleanups in test_imaplib. Patch by Milan Oberkirch. - Issue #22002: Added ``load_package_tests`` function to test.support and used