1 | n/a | """Main entry point""" |
---|
2 | n/a | |
---|
3 | n/a | import sys |
---|
4 | n/a | if sys.argv[0].endswith("__main__.py"): |
---|
5 | n/a | import os.path |
---|
6 | n/a | # We change sys.argv[0] to make help message more useful |
---|
7 | n/a | # use executable without path, unquoted |
---|
8 | n/a | # (it's just a hint anyway) |
---|
9 | n/a | # (if you have spaces in your executable you get what you deserve!) |
---|
10 | n/a | executable = os.path.basename(sys.executable) |
---|
11 | n/a | sys.argv[0] = executable + " -m unittest" |
---|
12 | n/a | del os |
---|
13 | n/a | |
---|
14 | n/a | __unittest = True |
---|
15 | n/a | |
---|
16 | n/a | from .main import main, TestProgram |
---|
17 | n/a | |
---|
18 | n/a | main(module=None) |
---|