Skip to content

Commit fb1fab0

Browse files
authored
YAML Test CLI Flag Fix (#35721)
* YAML Test CLI flag fix * YAML Test CLI flag support --tests and --test
1 parent 06b622c commit fb1fab0

File tree

1 file changed

+2
-1
lines changed
  • sdks/python/apache_beam/yaml

1 file changed

+2
-1
lines changed

sdks/python/apache_beam/yaml/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def _parse_arguments(argv):
100100
help='A json dict of variables used when invoking the jinja preprocessor '
101101
'on the provided yaml pipeline.')
102102
parser.add_argument(
103+
'--tests',
103104
'--test',
104105
action=argparse.BooleanOptionalAction,
105106
help='Run the tests associated with the given pipeline, rather than the '
@@ -290,7 +291,7 @@ def constructor(root):
290291
if __name__ == '__main__':
291292
import logging
292293
logging.getLogger().setLevel(logging.INFO)
293-
if '--test' in sys.argv:
294+
if '--tests' in sys.argv or '--test' in sys.argv:
294295
run_tests()
295296
else:
296297
run()

0 commit comments

Comments
 (0)