Home | History | Annotate | Download | only in unittest
      1 """Main entry point"""
      2 
      3 import sys
      4 if 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 
     16 from .main import main
     17 
     18 main(module=None)
     19