]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/__init__.py
1 """Make tests/ into a package. This allows us to "import tests" and
2 have tests.all_tests be a TestSuite representing all test cases
3 from all test_*.py files in tests/."""
4 # Author: Collin Winter
13 all_tests
= unittest
.TestSuite()
15 tests_dir
= os
.path
.join(os
.path
.dirname(__file__
), '..', 'tests')
16 tests
= [t
[0:-3] for t
in os
.listdir(tests_dir
)
17 if t
.startswith('test_') and t
.endswith('.py')]
19 loader
= unittest
.TestLoader()
22 __import__("",globals(),locals(),[t
],level
=1)
24 all_tests
.addTests(loader
.loadTestsFromModule(mod
))