Ejemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     super(PipelinedTestBase, self).__init__(*args, **kwargs)
     self.pipeline = test_pipeline.TestPipeline(
         runner=runners.DirectRunner(),
         options=test_pipeline.PipelineOptions(
             runtime_type_check=self.RUNTIME_TYPE_CHECK))
     self._pipeline_context_stack = None
Ejemplo n.º 2
0
    def run(self, result=None):
        """Run the test within the context of a test pipeline.

        https://docs.python.org/3/library/unittest.html#unittest.TestCase.run

        Args:
            result: TestResult | None. Holds onto the results of each test. If
                None, a temporary result object is created (by calling the
                defaultTestResult() method) and used instead.
        """
        runner = direct_runner.DirectRunner()
        options = test_pipeline.PipelineOptions(runtime_type_check=True)
        with test_pipeline.TestPipeline(runner=runner, options=options) as p:
            self.pipeline = p
            super(JobsTestBase, self).run(result=result)
Ejemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     super(PipelinedTestBase, self).__init__(*args, **kwargs)
     self.pipeline = test_pipeline.TestPipeline(
         runner=runners.DirectRunner(),
         options=test_pipeline.PipelineOptions(runtime_type_check=True))
     self._close_stack = None