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



##########
File path: airflow/utils/dag_cycle_tester.py
##########
@@ -25,6 +25,17 @@
 
 
 def test_cycle(dag):
+    """
+    A wrapper function of check_cycle for backward compatibility reason.
+    New code should use check_cycle instead, since this function name 
test_cycle starts with test_ and pytest
+    will consider it as a unit test causing failure.
+    """
+    from warnings import warn
+    warn("Deprecated, please use check_cycle at the same module instead.", 
DeprecationWarning)

Review comment:
       ```suggestion
       warn("Deprecated, please use `check_cycle` at the same module instead.", 
DeprecationWarning)
   ```




-- 
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:
[email protected]


Reply via email to