11# pylint:disable=redefined-outer-name
22# pylint:disable=unused-argument
33
4+ import asyncio
45import logging
56from collections .abc import Iterable
67from contextlib import suppress
@@ -432,8 +433,6 @@ async def test_setup_async_loggers_basic(
432433 test_logger .info ("Test async log message" )
433434
434435 # Give some time for async logging to process
435- import asyncio
436-
437436 await asyncio .sleep (0.1 )
438437
439438 # Check that the log message was captured
@@ -468,8 +467,6 @@ async def test_setup_async_loggers_with_filters(
468467 unfiltered_logger .info ("This is from unfiltered logger" )
469468
470469 # Give some time for async logging to process
471- import asyncio
472-
473470 await asyncio .sleep (0.1 )
474471
475472 # Check that filtered message was not captured
@@ -498,8 +495,6 @@ async def test_setup_async_loggers_with_tracing_settings(
498495 test_logger .info ("Test message with tracing settings" )
499496
500497 # Give some time for async logging to process
501- import asyncio
502-
503498 await asyncio .sleep (0.1 )
504499
505500 assert "Test message with tracing settings" in caplog .text
@@ -523,8 +518,6 @@ async def test_setup_async_loggers_context_manager_cleanup(
523518 test_logger .info ("Message during context" )
524519
525520 # Give some time for async logging to process
526- import asyncio
527-
528521 await asyncio .sleep (0.1 )
529522
530523
@@ -550,8 +543,6 @@ def _raise_test_exception():
550543 test_logger .info ("Message before exception" )
551544
552545 # Give some time for async logging to process
553- import asyncio
554-
555546 await asyncio .sleep (0.1 )
556547
557548 # Raise an exception to test cleanup
0 commit comments