Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sdks/python/apache_beam/yaml/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ def test_jinja_datetime(self):
fin.read().strip(), datetime.datetime.now().strftime("%Y-%m-%d"))

def test_inline_test_specs(self):
main.run_tests(['--yaml_pipeline', TEST_PIPELINE, '--test'], exit=False)
for flag in ['--tests', '--test']:
known_args, pipeline_args = main._parse_arguments(
['--yaml_pipeline', TEST_PIPELINE, flag])
self.assertTrue(known_args.tests)
self.assertEqual(pipeline_args, [])
main.run_tests(['--yaml_pipeline', TEST_PIPELINE, flag], exit=False)

def test_external_test_specs(self):
with tempfile.TemporaryDirectory() as tmpdir:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ Neither the actual Read transform nor Write transform from the original
pipelines are executed when running the test, but all intermediate transforms
are.

This test can then be executed by running
This test can then be executed with the `--tests` (or `--test`) flag by running

```
python -m apache_beam.yaml.main \
--yaml_pipeline_file=wordcount.yaml \
--tests
```

Alternatively, the a `tests:` block may be placed in a separate file and be
Alternatively, a `tests:` block may be placed in a separate file and be
validated by running

```
Expand Down Expand Up @@ -279,7 +279,7 @@ tests:
- name: Upper
elements: [element: A, element: Z]

- name: TestMultipelOuptuts
- name: TestMultipleOutputs
mock_inputs:
- name: Upper
elements: [element: m, element: nnn]
Expand Down
Loading