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 berker.peksag, brett.cannon, ezio.melotti, serhiy.storchaka, zach.ware
Date 2014-07-17.20:09:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's a patch against 3.4 implementing Serhiy's suggestion in msg223277 and taking it a step further, actually using test discovery in all of the test.test_* subpackages.

To reduce duplication, the patch adds a 'load_package_tests' function to, which is then used in each of the subpackages' load_tests function.

test_json and test_tools should have no visible changes from this patch.  test_asyncio and test_email do have slight differences, but only in verbosity level: pre-patch, `python -m test.test_(asyncio|email)` runs at verbosity=2 (support.run_unittest default); with patch, they run at verbosity=1 (unittest default).  test_asyncio also reports one more skipped test on Windows, due to a module that raises SkipTest on import.

@Brett: test_importlib sees the most changes, and I'd like to be sure that things are as you expect them to be.  It looks like all of the test_suite() stuff is unused leftovers from when "test_importlib" was "importlib.test" and that test_importlib has actually been relying on unittest discovery (but bypassing load_tests and thereby not working with `python -m unittest test.test_importlib`), but I'd like confirmation on that.

A nice bonus with this patch is that (for example) `python -m test.test_importlib.source` works, testing just the named test_importlib subpackage.
Date User Action Args
2014-07-17 20:09:20zach.waresetrecipients: + zach.ware, brett.cannon, ezio.melotti, berker.peksag, serhiy.storchaka
2014-07-17 20:09:20zach.waresetmessageid: <>
2014-07-17 20:09:20zach.warelinkissue22002 messages
2014-07-17 20:09:20zach.warecreate