File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/test_primitives/test_reawaitable Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44from returns .primitives .reawaitable import ReAwaitable , reawaitable
55
66
7- # Fix for issue with multiple awaits on the same ReAwaitable instance
8- # causing race conditions: https://github.com/dry-python/returns/issues/2048
7+ # Fix for issue with multiple awaits on the same ReAwaitable instance:
8+ # https://github.com/dry-python/returns/issues/2108
99async def sample_coro () -> str :
10- """Sample coroutine for testing ."""
10+ """Sample coroutine that simulates an async operation ."""
1111 await anyio .sleep (1 ) # Increased from 0.1 to reduce chance of random failures
1212 return 'done'
1313
@@ -19,7 +19,7 @@ async def await_helper(awaitable_obj) -> str:
1919
2020@pytest .mark .anyio
2121async def test_concurrent_awaitable () -> None :
22- """Test that ReAwaitable works with concurrent awaits."""
22+ """Test that ReAwaitable safely handles concurrent awaits using a lock ."""
2323 test_target = ReAwaitable (sample_coro ())
2424
2525 async with anyio .create_task_group () as tg :
You can’t perform that action at this time.
0 commit comments