class_docstr: A command-line program that runs a set of tests; this is primarily
  for making test modules conveniently executable.
class_docstr_tok: ["A","command-line","program","that","runs","a","set","of","tests",";","this","is","primarily","for","making","test","modules","conveniently","executable","."]
code: def parseArgs(self, argv):
      self._initArgParsers()
      if self.module is None:
          if len(argv) > 1 and argv[1].lower() == "discover":
              self._do_discovery(argv[2:])
              return
          self._main_parser.parse_args(argv[1:], self)
          if not self.tests:
              # this allows "python -m unittest -v" to still work for
              # test discovery.
              self._do_discovery([])
              return
      else:
          self._main_parser.parse_args(argv[1:], self)
  
      if self.tests:
          self.testNames = _convert_names(self.tests)
          if __name__ == "__main__":
              # to support python -m unittest ...
              self.module = None
      elif self.defaultTest is None:
          # createTests will load tests from self.module
          self.testNames = None
      elif isinstance(self.defaultTest, str):
          self.testNames = (self.defaultTest,)
      else:
          self.testNames = list(self.defaultTest)
      self.createTests()
  
file_path: cpython/Lib/unittest/main.py
imports: import sys
  import argparse
  import os
  from .None import loader, runner
  from .signals import installHandler
label_desc: Use image node_id 3 for calling the TestProgram obj's underlying member method code with example usage: obj.parseArgs(argv) without return types