ashb commented on a change in pull request #12308:
URL: https://github.com/apache/airflow/pull/12308#discussion_r522456719



##########
File path: tests/plugins/test_plugins_manager.py
##########
@@ -163,14 +170,16 @@ class AirflowAdminMenuLinksPlugin(AirflowPlugin):
 
             appbuilder_menu_items = [mock.MagicMock()]
 
-        with mock_plugin_manager(plugins=[AirflowAdminViewsPlugin(), 
AirflowAdminMenuLinksPlugin()]):
+        with mock_plugin_manager(
+            plugins=[AirflowAdminViewsPlugin(), AirflowAdminMenuLinksPlugin()]
+        ), caplog.at_level(logging.WARNING):
             from airflow import plugins_manager
 
-            # assert not logs
-            with self.assertRaises(AssertionError), 
self.assertLogs(plugins_manager.log):

Review comment:
       I found this a huge code smell, and a funny/hard to follow way of saying 
"does not log".
   
   So I switched it all out to pytests `caplog` fixture.




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