You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/25 01:37:18 UTC

[GitHub] [airflow] mik-laj commented on pull request #8552: fix help message display for dags test subcommand

mik-laj commented on pull request #8552:
URL: https://github.com/apache/airflow/pull/8552#issuecomment-619299600


   Can you add test to avoid regression? I think something similar to the one below is enough.
   ```
   tests/cli/test_cli_parser.py
   ```
   ```python
       def test_should_display_helps(self):
           parser = cli_parser.get_parser()
   
           all_command_as_args = sum([
               [[top_commaand.name]]
               if isinstance(top_commaand, cli_parser.ActionCommand)
               else [
                   [top_commaand.name, nested_command.name] for nested_command in top_commaand.subcommands
               ]
   
               for top_commaand in cli_parser.airflow_commands
           ], [])
           for cmd_args in all_command_as_args:
               with self.assertRaises(SystemExit):
                   parser.parse_args([*cmd_args, '--help'])
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org