juditnovak commented on code in PR #59389:
URL: https://github.com/apache/airflow/pull/59389#discussion_r2616397877


##########
devel-common/src/tests_common/pytest_plugin.py:
##########
@@ -415,6 +421,18 @@ def initialize_airflow_tests(request):
 
     print(f"Home of the user: {home}\nAirflow home {airflow_home}")
 
+    if request.config.option.load_config:
+        from airflow.configuration import conf, 
load_standard_airflow_configuration, AIRFLOW_CONFIG
+        saved_af_conf = AIRFLOW_CONFIG
+        AIRFLOW_CONFIG = request.config.option.load_config
+        try:
+            load_standard_airflow_configuration(conf)
+        except:
+            raise
+        finally:
+            AIRFLOW_CONFIG = saved_af_conf
+        conf.validate()

Review Comment:
   The snippet above is just one possible solution, to demonstrate the base 
concept (and may not be the best -- feedback is welcome).
   
   On my current pipelines I'm using `conf.read_file()`.



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