ยปCore Development>Code coverage>Tools/test2to3/test/runtests.py

Python code coverage for Tools/test2to3/test/runtests.py

#countcontent
1n/a# Fictitious test runner for the project
2n/a
3n/aimport sys, os
4n/a
5n/aif sys.version_info > (3,):
6n/a # copy test suite over to "build/lib" and convert it
7n/a from distutils.util import copydir_run_2to3
8n/a testroot = os.path.dirname(__file__)
9n/a newroot = os.path.join(testroot, '..', 'build/lib/test')
10n/a copydir_run_2to3(testroot, newroot)
11n/a # in the following imports, pick up the converted modules
12n/a sys.path[0] = newroot
13n/a
14n/a# run the tests here...
15n/a
16n/afrom test_foo import FooTest
17n/a
18n/aimport unittest
19n/aunittest.main()