potiuk commented on issue #16426:
URL: https://github.com/apache/airflow/issues/16426#issuecomment-865780679


   Down to one failing test for Python 3.9:
   
   
https://github.com/potiuk/airflow/runs/2882423982?check_suite_focus=true#step:6:9807
   
   ```
    ____ TestPluginsManager.test_entrypoint_plugin_errors_dont_raise_exceptions 
____
     
     self = <tests.plugins.test_plugins_manager.TestPluginsManager object at 
0x7f456c9dccd0>
     caplog = <_pytest.logging.LogCaptureFixture object at 0x7f456c5c9160>
     
         def test_entrypoint_plugin_errors_dont_raise_exceptions(self, caplog):
             """
             Test that Airflow does not raise an error if there is any 
Exception because of a plugin.
             """
             from airflow.plugins_manager import import_errors, 
load_entrypoint_plugins
         
             mock_dist = mock.Mock()
         
             mock_entrypoint = mock.Mock()
             mock_entrypoint.name = 'test-entrypoint'
             mock_entrypoint.group = 'airflow.plugins'
             mock_entrypoint.module = 'test.plugins.test_plugins_manager'
             mock_entrypoint.load.side_effect = ImportError('my_fake_module not 
found')
             mock_dist.entry_points = [mock_entrypoint]
         
             with mock.patch(f'{importlib_metadata}.distributions', 
return_value=[mock_dist]), caplog.at_level(
                 logging.ERROR, logger='airflow.plugins_manager'
             ):
                 load_entrypoint_plugins()
         
                 received_logs = caplog.text
                 # Assert Traceback is shown too
     >           assert "Traceback (most recent call last):" in received_logs
     E           AssertionError: assert 'Traceback (most recent call last):' in 
''
     
     tests/plugins/test_plugins_manager.py:293: AssertionError
   
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to