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 2021/06/24 15:53:34 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #16617: Rename test_cycle to check_cycle

uranusjr commented on a change in pull request #16617:
URL: https://github.com/apache/airflow/pull/16617#discussion_r658075860



##########
File path: airflow/utils/dag_cycle_tester.py
##########
@@ -25,6 +25,21 @@
 
 
 def test_cycle(dag):
+    """
+    A wrapper function of `check_cycle` for backward compatibility purpose.
+    New code should use `check_cycle` instead since this function name `test_cycle` starts with 'test_' and
+    will be considered as a unit test by pytest, resulting in failure.
+    """
+    from warnings import warn

Review comment:
       Why does this import need to be local?




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