Issue #22002: Make full use of test discovery in test sub-packages.

Adds `load_package_tests` function to test.support, uses it in test_asyncio,
test_email, test_json, test_tools, test_importlib and all test_importlib
sub-packages to implement test discovery.
This commit is contained in:
Zachary Ware 2014-07-23 12:00:29 -05:00
parent c4c464911a
commit f012ba42fe
21 changed files with 104 additions and 169 deletions

View file

@ -1,12 +1,5 @@
from .. import test_suite
import os
from test.support import load_package_tests
def test_suite():
directory = os.path.dirname(__file__)
return test_suite('importlib.test.builtin', directory)
if __name__ == '__main__':
from test.support import run_unittest
run_unittest(test_suite())
def load_tests(*args):
return load_package_tests(os.path.dirname(__file__), *args)

View file

@ -0,0 +1,4 @@
from . import load_tests
import unittest
unittest.main()