sjyangkevin commented on code in PR #53690:
URL: https://github.com/apache/airflow/pull/53690#discussion_r2236214403


##########
airflow-core/tests/unit/serialization/test_serde.py:
##########
@@ -61,6 +62,56 @@ def recalculate_patterns():
         _match_regexp.cache_clear()
 
 
+def generate_serializers_importable_and_str_test_cases():
+    """Generate test cases for `test_serializers_importable_and_str` by 
collecting all serializer import strings defined in modules under 
`airflow.serialization.serializers`"""
+    import airflow.serialization.serializers
+
+    NUMPY_VERSION = version.parse(metadata.version("numpy"))
+    serializer_collection = []
+
+    for _, name, _ in iter_namespace(airflow.serialization.serializers):
+        if name == "airflow.serialization.serializers.iceberg":
+            try:
+                import pyiceberg  # noqa: F401
+            except ImportError:
+                continue
+        if name == "airflow.serialization.serializers.deltalake":
+            try:
+                import deltalake  # noqa: F401
+            except ImportError:
+                continue
+        mod = import_module(name)
+        for s in getattr(mod, "serializers", list()):
+            if s == "numpy.bool" and NUMPY_VERSION.major < 2:
+                serializer_collection.append(
+                    pytest.param(
+                        name,
+                        s,
+                        marks=pytest.mark.xfail(
+                            reason=f"""

Review Comment:
   Thanks for the feedback. Will do.



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