File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
tests/test_primitives/test_reawaitable Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 55# Try to use anyio.Lock, fall back to asyncio.Lock
66try :
77 import anyio
8+
89 Lock = anyio .Lock
910except ImportError :
1011 import asyncio
12+
1113 Lock = asyncio .Lock
1214
1315_ValueType = TypeVar ('_ValueType' )
Original file line number Diff line number Diff line change 88# causing race conditions: https://github.com/dry-python/returns/issues/2048
99async def sample_coro () -> str :
1010 """Sample coroutine for testing."""
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