ephraimbuddy commented on code in PR #30943:
URL: https://github.com/apache/airflow/pull/30943#discussion_r1183496297


##########
tests/models/test_mappedoperator.py:
##########
@@ -57,6 +59,32 @@ def test_task_mapping_with_dag():
     assert mapped.downstream_list == [finish]
 
 
+def test_task_mapping_with_dag_and_list_of_pandas_dataframe(caplog):
+    caplog.set_level(logging.INFO)
+
+    class UnrenderableClass:
+        def __non_zero__(self):
+            raise ValueError("Similar to Pandas DataFrames, this class does 
not implement zero comparison.")
+
+    class CustomOperator(BaseOperator):
+        template_fields = ("arg",)
+
+        def __init__(self, arg, **kwargs):
+            super().__init__(**kwargs)
+            self.arg = arg
+
+        def execute(self, context: Context):
+            pass
+
+    with DAG("test-dag", start_date=DEFAULT_DATE) as dag:
+        task1 = CustomOperator(task_id="op1", arg=None)
+        unrenderable_values = [UnrenderableClass(), UnrenderableClass()]
+        mapped = 
CustomOperator.partial(task_id="task_2").expand(arg=unrenderable_values)
+        task1 >> mapped
+    dag.test()
+    assert caplog.text.count("task_2 ran successfully") == 2

Review Comment:
   The test seems to pass without the change.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to