Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::cmd::runner::TestSuiteRunner::_run (   self,
  loggerclass,
  setup_once 
) [private]

Run fixture methods and later the test cases in the test suite one by one

Definition at line 111 of file runner.py.

00111                                            :
        """
        Run fixture methods and later the test cases in the test suite one by one
        """
        if loggerclass:
            logger = loggerclass()
        else:
            logger = ldtp

        if setup_once:
            # Set up the environment.
            self.suite.setup()

        firsttest = True

        case_runners = [TestCaseRunner(case_data, self.suite)
                        for case_data in self.suite_data.cases()]
        for case_runner in case_runners:
            if not setup_once:
                # Set up the app for each test, if requested.
                self.suite.setup()
            if not firsttest:
                # Clean up from previous run.
                self.suite.cleanup()
            firsttest = False
            case_runner.run(logger)
            if not setup_once:
                # Teardown upthe app for each test, if requested.
                self.suite.teardown()

        if setup_once:
            # Tear down after entire suite.
            self.suite.teardown()
            self.suite.teardown()


Generated by  Doxygen 1.6.0   Back to index