diff --git a/sdks/python/apache_beam/testing/test_pipeline.py b/sdks/python/apache_beam/testing/test_pipeline.py index 712da8636234..5acc3ad34937 100644 --- a/sdks/python/apache_beam/testing/test_pipeline.py +++ b/sdks/python/apache_beam/testing/test_pipeline.py @@ -99,7 +99,7 @@ def __init__( display_data (Dict[str, Any]): a dictionary of static data associated with this pipeline that can be displayed when it runs. timeout (int, optional): Milliseconds to wait for the pipeline to finish. - If the timeout is reached, an AssertionError is raised. + If the timeout is reached, an AssertionError is raised. Raises: ValueError: if either the runner or options argument is not of the expected type. @@ -153,8 +153,9 @@ def _parse_test_option_args(self, argv): default=False, help='whether not to use test-runner-api') known, unused_argv = parser.parse_known_args(argv) - test_pipeline_options = known.test_pipeline_options or \ - TestPipeline.pytest_test_pipeline_options + test_pipeline_options = known.test_pipeline_options or ( + TestPipeline.pytest_test_pipeline_options + if self.is_integration_test else None) if self.is_integration_test and not test_pipeline_options: # Skip integration test when argument '--test-pipeline-options' is not # specified since nose calls integration tests when runs unit test by