potiuk commented on code in PR #44755:
URL: https://github.com/apache/airflow/pull/44755#discussion_r1875607872


##########
tests/executors/test_executor_loader.py:
##########
@@ -146,6 +146,11 @@ def test_get_hybrid_executors_from_config(self, 
executor_config, expected_execut
             assert executors == expected_executors_list
 
     def test_init_executors(self):
+        # We need to init provider config in order to import CeleryExecutor
+        ProvidersManager().initialize_providers_configuration()
+
+        from airflow.providers.celery.executors.celery_executor import 
CeleryExecutor
+

Review Comment:
   Or maybe there is a scenario that those fixture from `pytest_plugin` have 
not been loaded somehow and that's why you had problem with it ? 
   
   The fixtures from `tests_common.pytest_plugin` should be loaded via 
https://github.com/apache/airflow/blob/320bb38d3f91da1a1a208cc735b91d9a2a533b71/tests/conftest.py#L32
 -  but maybe there is a case they are not ?
   
   ```
   pytest_plugins = "tests_common.pytest_plugin"
   ```



##########
tests/executors/test_executor_loader.py:
##########
@@ -146,6 +146,11 @@ def test_get_hybrid_executors_from_config(self, 
executor_config, expected_execut
             assert executors == expected_executors_list
 
     def test_init_executors(self):
+        # We need to init provider config in order to import CeleryExecutor
+        ProvidersManager().initialize_providers_configuration()
+
+        from airflow.providers.celery.executors.celery_executor import 
CeleryExecutor
+

Review Comment:
   Or maybe there is a scenario that those fixture from `pytest_plugin` have 
not been loaded somehow and that's why you had problem with it ? 
   
   The fixtures from `tests_common.pytest_plugin` should be loaded via 
https://github.com/apache/airflow/blob/320bb38d3f91da1a1a208cc735b91d9a2a533b71/tests/conftest.py#L32
 -  but maybe there is a case they are not ?
   



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