def parseArgs(self, argv):
        import getopt
        try:
            options, args = getopt.getopt(argv[1:], 'hHvqer',
                                  ['help','verbose','quiet','explain', 'raise'])
            for opt, value in options:
                if opt in ('-h','-H','--help'):
                    self.usageExit()
                if opt in ('-q','--quiet'):
                    self.verbosity = 0
                if opt in ('-v','--verbose'):
                    self.verbosity = 2
                if opt in ('-e','--explain'):
                    self.explain = True
            if len(args) == 0 and self.defaultTest is None and self.test is None:
                self.test = self.testLoader.loadTestsFromModule(self.module)
                return
            if len(args) > 0:
                self.testNames = args
            else:
                self.testNames = (self.defaultTest,)
            self.createTests()
        except getopt.error, msg:
            self.usageExit(msg)
dataset/ETHPy150Open skyostil/tracy/src/generator/Cheetah/Tests/unittest_local_copy.py/TestProgram.parseArgs/original