def dispatch_tests(self, test_instances): for (test_name, test) in test_instances: if test.is_disabled(): logging.debug("Test %s is disabled." % test.name) test.setStatus("DISABLED") else: try: routine = self.RoutineType(test=test) routine.start() except core.PyTestUsageError, e: # --traceback: This flag triggers routines to report # the traceback of PyTestUsageError. By default, only the # class's name and meesage are reported. if self.options.traceback: logging.critical( core.traceback(e) ) else: logging.debug(e) test.setStatus("SKIPPED", core.traceback(e))
def dispatch_tests(self, test_instances): for (test_name, test) in test_instances: if test.is_disabled(): logging.debug("Test %s is disabled." % test.name) test.setStatus("DISABLED") else: try: routine = self.RoutineType(test=test) routine.start() except core.PyTestUsageError, e: # --traceback: This flag triggers routines to report # the traceback of PyTestUsageError. By default, only the # class's name and meesage are reported. if self.options.traceback: logging.critical(core.traceback(e)) else: logging.debug(e) test.setStatus("SKIPPED", core.traceback(e))
############################################################ ## Program name and copyrights with version number newline = '\n ' logging.info( newline.join( [ "%sPyTest %s"%(newline,pytest_version()), "(c) 2004-2006, Christian Dorion", "This is free software distributed under a BSD type license.", "Report problems to [email protected]\n" ]) ) try: parser.selected_mode( targets, options ) except KeyboardInterrupt, kex: if options.traceback: print core.traceback(kex) else: logging.info("Interupted by user.") except core.PyTestUsageError, e: core.updateExitCode("USAGE ERROR") if options.traceback: print core.traceback(e) else: logging.critical( "%s: %s." % (e.__class__.__name__,e) ) except Exception, unexpected: core.updateExitCode("INTERNAL ERROR") print core.traceback(unexpected) logging.debug("\nQuitting PyTest.")
## Program name and copyrights with version number newline = '\n ' logging.info( newline.join([ "%sPyTest %s" % (newline, pytest_version()), "(c) 2004-2006, Christian Dorion", "This is free software distributed under a BSD type license.", "Report problems to [email protected]\n" ])) try: parser.selected_mode(targets, options) except KeyboardInterrupt, kex: if options.traceback: print core.traceback(kex) else: logging.info("Interupted by user.") except core.PyTestUsageError, e: core.updateExitCode("USAGE ERROR") if options.traceback: print core.traceback(e) else: logging.critical("%s: %s." % (e.__class__.__name__, e)) except Exception, unexpected: core.updateExitCode("INTERNAL ERROR") print core.traceback(unexpected) logging.debug("\nQuitting PyTest.")