def __init__(self):
     self.appargs = ApplicationArguments()
     logger.set_debug(self.appargs.degbug())
     self.manuscript = Manuscript(self.appargs.manuscripts(),
                                  self.appargs.paths(),
                                  self.appargs.placeholders())
     if self.appargs.autoexit():
         self.manuscript.add_autoexit_instruction()
class TestEngine(object):
    def __init__(self):
        self.appargs = ApplicationArguments()
        logger.set_debug(self.appargs.degbug())
        self.manuscript = Manuscript(self.appargs.manuscripts(),
                                     self.appargs.paths(),
                                     self.appargs.placeholders())
        if self.appargs.autoexit():
            self.manuscript.add_autoexit_instruction()

    def _log_effective_manuscript(self):
        Logger.set_path(self.manuscript.get_log_path())
        Logger.add_section("Manuscript", u"%s" % self.manuscript)

    def _test(self):
        Logger.set_path(self.manuscript.get_log_path())
        Logger.set_log_dialog_descriptions(
            self.appargs.log_dialog_descriptions())
        Logger.add_debug("Application arguments")
        Logger.add_debug(" ".join(sys.argv))
        Logger.add_section("Manuscript", u"%s" % self.manuscript)
        instructions = Instructions(self.manuscript, self.appargs.timedelay())
        start_app(instructions, self.appargs.program())

    def run(self):
        if self.appargs.investigate():
            self._log_effective_manuscript()
        else:
            try:
                self._test()
            finally:
                Logger.log()
        return not Logger.has_errors()
Beispiel #3
0
class TestEngine(object):

    def __init__(self):
        self.appargs = ApplicationArguments()
        logger.set_debug(self.appargs.degbug())
        self.manuscript = Manuscript(self.appargs.manuscripts(), self.appargs.paths(), self.appargs.placeholders())
        if self.appargs.autoexit():
            self.manuscript.add_autoexit_instruction()

    def _log_effective_manuscript(self):
        Logger.set_path(self.manuscript.get_log_path())
        Logger.add_section("Manuscript", u"%s" % self.manuscript)

    def _test(self):
        Logger.set_path(self.manuscript.get_log_path())
        Logger.set_log_dialog_descriptions(self.appargs.log_dialog_descriptions())
        Logger.add_debug("Application arguments")
        Logger.add_debug(" ".join(sys.argv))
        Logger.add_section("Manuscript", u"%s" % self.manuscript)
        instructions = Instructions(self.manuscript, self.appargs.timedelay())
        start_app(instructions, self.appargs.program())

    def run(self):
        if self.appargs.investigate():
            self._log_effective_manuscript()
        else:
            try:
                self._test()
            finally:
                Logger.log()
        return not Logger.has_errors()
Beispiel #4
0
 def __init__(self):
     self.appargs = ApplicationArguments()
     logger.set_debug(self.appargs.degbug())
     self.manuscript = Manuscript(self.appargs.manuscripts(), self.appargs.paths(), self.appargs.placeholders())
     if self.appargs.autoexit():
         self.manuscript.add_autoexit_instruction()