File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
tests/test_primitives/test_reawaitable Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 77 import anyio # noqa: WPS433
88except ImportError :
99 import asyncio # noqa: WPS433
10+
1011 Lock = asyncio .Lock
1112else :
1213 Lock = anyio .Lock
Original file line number Diff line number Diff line change 88# https://github.com/dry-python/returns/issues/2108
99async def sample_coro () -> str :
1010 """Sample coroutine that simulates an async operation."""
11- await anyio .sleep (1 ) # Increased from 0.1 to reduce chance of random failures
11+ await anyio .sleep (
12+ 1
13+ ) # Increased from 0.1 to reduce chance of random failures
1214 return 'done'
1315
1416
@@ -32,8 +34,10 @@ async def test_reawaitable_decorator() -> None:
3234 """Test the reawaitable decorator with concurrent awaits."""
3335
3436 async def test_coro () -> str : # noqa: WPS430
35- await anyio .sleep (1 ) # Increased from 0.1 to reduce chance of random failures
36- return "decorated"
37+ await anyio .sleep (
38+ 1
39+ ) # Increased from 0.1 to reduce chance of random failures
40+ return 'decorated'
3741
3842 decorated = reawaitable (test_coro )
3943 instance = decorated ()
@@ -42,7 +46,7 @@ async def test_coro() -> str: # noqa: WPS430
4246 result1 = await instance
4347 result2 = await instance
4448
45- assert result1 == " decorated"
49+ assert result1 == ' decorated'
4650 assert result1 == result2
4751
4852 # Test concurrent awaits
You can’t perform that action at this time.
0 commit comments