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