mirror of https://github.com/python/cpython
asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky Kok. Closes #20668
This commit is contained in:
parent
223082fc69
commit
00abf385ac
|
@ -10,13 +10,11 @@ import_module('concurrent.futures')
|
|||
|
||||
|
||||
def suite():
|
||||
tests_file = os.path.join(os.path.dirname(__file__), 'tests.txt')
|
||||
with open(tests_file) as fp:
|
||||
test_names = fp.read().splitlines()
|
||||
tests = unittest.TestSuite()
|
||||
loader = unittest.TestLoader()
|
||||
for test_name in test_names:
|
||||
mod_name = 'test.' + test_name
|
||||
for fn in os.listdir(os.path.dirname(__file__)):
|
||||
if fn.startswith("test") and fn.endswith(".py"):
|
||||
mod_name = 'test.test_asyncio.' + fn[:-3]
|
||||
try:
|
||||
__import__(mod_name)
|
||||
except unittest.SkipTest:
|
||||
|
|
Loading…
Reference in New Issue