amoghrajesh commented on code in PR #57853:
URL: https://github.com/apache/airflow/pull/57853#discussion_r2517711009


##########
airflow-core/tests/unit/serialization/test_dag_serialization.py:
##########
@@ -113,31 +113,30 @@ def operator_defaults(overrides):
         with operator_defaults({"retries": 2, "retry_delay": 200.0}):
             # Test code with modified operator defaults
     """
+    import airflow.sdk.definitions._internal.abstractoperator as 
abstract_op_module
     from airflow.sdk.bases.operator import OPERATOR_DEFAULTS
+    from airflow.serialization.serialized_objects import SerializedBaseOperator
 
     original_values = {}
-    try:
-        # Store original values and apply overrides
-        for key, value in overrides.items():
-            original_values[key] = OPERATOR_DEFAULTS.get(key)
-            OPERATOR_DEFAULTS[key] = value
+    with pytest.MonkeyPatch.context() as monkeypatch:

Review Comment:
   Pushed a change here: [handling TP 
comments](https://github.com/apache/airflow/pull/57853/commits/3ac0ca18e4a124f06be831e5e680e5708025b48e)



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