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