File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ def test_logging_handler_deduplication():
5656 initial_handler_count = sum (1 for h in root_logger .handlers if isinstance (h , LoggingHandler ))
5757
5858 # Create first app
59- app1 = create_app ()
59+ create_app ()
6060 handler_count_after_first = sum (1 for h in root_logger .handlers if isinstance (h , LoggingHandler ))
6161
6262 # Create second app
63- app2 = create_app ()
63+ create_app ()
6464 handler_count_after_second = sum (1 for h in root_logger .handlers if isinstance (h , LoggingHandler ))
6565
6666 # Assert only one LoggingHandler exists after multiple create_app() calls
@@ -76,7 +76,10 @@ def test_logging_handler_deduplication():
7676 try :
7777 handler .close ()
7878 except Exception :
79- pass
79+ logging .getLogger (__name__ ).debug (
80+ "Failed to close LoggingHandler during test cleanup" ,
81+ exc_info = True ,
82+ )
8083 finally :
8184 # Restore original environment
8285 if original_env is not None :
You can’t perform that action at this time.
0 commit comments