Beispiel #1
0
    def run(self):
        #   FIXME: Add Docstring

        # called from `pyvows.core:Vows.run()`,
        # which is called from `pyvows.cli.run()`

        start_time = time.time()
        result = VowsResult()
        if self.capture_output:
            self._capture_streams(self.capture_output)
        try:
            for suiteName, suitePlan in self.execution_plan.iteritems():
                batches = [
                    batch for batch in self.suites[suiteName]
                    if batch.__name__ in suitePlan['contexts']
                ]
                for batch in batches:
                    self.pool.spawn(self.run_context,
                                    result.contexts,
                                    batch.__name__,
                                    batch(None),
                                    suitePlan['contexts'][batch.__name__],
                                    index=-1,
                                    suite=suiteName)

            self.pool.join()
        finally:
            self._capture_streams(False)

        result.elapsed_time = elapsed(start_time)
        return result
Beispiel #2
0
    def run(self):
        #   FIXME: Add Docstring

        # called from `pyvows.core:Vows.run()`,
        # which is called from `pyvows.cli.run()`

        start_time = time.time()
        result = VowsResult()
        if self.capture_output:
            self._capture_streams(self.capture_output)
        try:
            for suiteName, suitePlan in self.execution_plan.iteritems():
                batches = [batch for batch in self.suites[suiteName] if batch.__name__ in suitePlan['contexts']]
                for batch in batches:
                    self.pool.spawn(
                        self.run_context,
                        result.contexts,
                        batch.__name__,
                        batch(None),
                        suitePlan['contexts'][batch.__name__],
                        index=-1,
                        suite=suiteName
                    )

            self.pool.join()
        finally:
            self._capture_streams(False)

        result.elapsed_time = elapsed(start_time)
        return result
Beispiel #3
0
    def run(self):
        #   FIXME: Add Docstring

        # called from `pyvows.core:Vows.run()`,
        # which is called from `pyvows.cli.run()`

        start_time = time.time()
        result = VowsResult()
        for ctx_name, context in self.batches.iteritems():
            self.run_context(result.contexts, ctx_name, context(None))
        self.pool.join()
        result.elapsed_time = elapsed(start_time)
        return result
Beispiel #4
0
    def run(self):
        #   FIXME: Add Docstring

        # called from `pyvows.core:Vows.run()`,
        # which is called from `pyvows.cli.run()`

        start_time = time.time()
        result = VowsResult()
        for suite, batches in self.suites.items():
            for batch in batches:
                self.pool.spawn(self.run_context,
                                result.contexts,
                                ctx_name=batch.__name__,
                                ctx_obj=batch(None),
                                index=-1,
                                suite=suite)

        self.pool.join()
        result.elapsed_time = elapsed(start_time)
        return result
Beispiel #5
0
    def run(self):
        #   FIXME: Add Docstring
 
        # called from `pyvows.core:Vows.run()`,
        # which is called from `pyvows.cli.run()`
 
        start_time = time.time()
        result = VowsResult()
        for suite, batches in self.suites.items():
            for batch in batches:
                self.pool.spawn(
                    self.run_context, 
                    result.contexts, 
                    ctx_name = batch.__name__, 
                    ctx_obj  = batch(None), 
                    index    = -1, 
                    suite    = suite 
                )
             
        self.pool.join()
        result.elapsed_time = elapsed(start_time)
        return result