mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Issue #22173: Update lib2to3 tests to use unittest test discovery.
This commit is contained in:
parent
b7354a65ce
commit
2acbae8016
7 changed files with 19 additions and 38 deletions
|
|
@ -1,22 +1,5 @@
|
|||
# Skipping test_parser and test_all_fixers
|
||||
# because of running
|
||||
from lib2to3.tests import (test_fixers, test_pytree, test_util, test_refactor,
|
||||
test_parser,
|
||||
test_main as test_main_)
|
||||
from lib2to3.tests import load_tests
|
||||
import unittest
|
||||
from test.support import run_unittest
|
||||
|
||||
def suite():
|
||||
tests = unittest.TestSuite()
|
||||
loader = unittest.TestLoader()
|
||||
for m in (test_fixers, test_pytree, test_util, test_refactor, test_parser,
|
||||
test_main_):
|
||||
tests.addTests(loader.loadTestsFromModule(m))
|
||||
return tests
|
||||
|
||||
def test_main():
|
||||
run_unittest(suite())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_main()
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue