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 2022/06/06 14:56:17 UTC

[GitHub] [airflow] Bowrna commented on a diff in pull request #23870: DAG regex flag in backfill command

Bowrna commented on code in PR #23870:
URL: https://github.com/apache/airflow/pull/23870#discussion_r890239143


##########
tests/cli/commands/test_dag_command.py:
##########
@@ -176,6 +176,33 @@ def test_backfill(self, mock_run):
         )
         mock_run.reset_mock()
 
+        with contextlib.redirect_stdout(io.StringIO()) as stdout:
+            dag_command.dag_backfill(
+                self.parser.parse_args(
+                    [
+                        'dags',
+                        'backfill',
+                        'example_branch_(python_){0,1}operator(_decorator){0,1}',
+                        '--task-regex',
+                        'run_this_first',
+                        '--dry-run',
+                        '--dag-regex',
+                        '--start-date',
+                        DEFAULT_DATE.isoformat(),
+                    ]
+                ),
+            )
+
+        output = stdout.getvalue()
+
+        assert (
+            f"Dry run of DAG example_branch_python_operator_decorator on "
+            f"{DEFAULT_DATE.isoformat()}\n" in output
+        )

Review Comment:
   @domagojrazum Some static checks are failing at this point due to concatenated string literals. 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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