bolkedebruin commented on code in PR #30823:
URL: https://github.com/apache/airflow/pull/30823#discussion_r1174585906


##########
tests/serialization/test_serde.py:
##########
@@ -309,3 +309,31 @@ def test_stringify(self):
     )
     def test_serialized_data(self, obj, expected):
         assert expected == serialize(obj)
+
+    def test_serialize_nested_primitive_and_non_primitive_values(self):
+        import pandas
+
+        def _compare(actual_obj, expected_obj):
+            assert len(actual_obj) == len(expected_obj)
+            for key in actual_obj:
+                if isinstance(actual_obj[key], dict):
+                    return _compare(actual_obj[key], expected_obj[key])
+                if isinstance(actual_obj[key], pandas.DataFrame):
+                    assert actual_obj[key].equals(expected_obj[key])
+                else:
+                    assert actual_obj[key] == expected_obj[key]
+
+        data = (

Review Comment:
   why not use `@pytest.mark.parametrize` here, makes it consistent with other 
test cases.



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