File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -104,16 +104,16 @@ async def test_blocking(self, r):
104
104
lock_2 = self .get_lock (r , "foo" )
105
105
assert lock_2 .blocking
106
106
107
- async def test_blocking_timeout (self , r , event_loop ):
107
+ async def test_blocking_timeout (self , r ):
108
108
lock1 = self .get_lock (r , "foo" )
109
109
assert await lock1 .acquire (blocking = False )
110
110
bt = 0.2
111
111
sleep = 0.05
112
112
lock2 = self .get_lock (r , "foo" , sleep = sleep , blocking_timeout = bt )
113
- start = event_loop .time ()
113
+ start = asyncio . get_running_loop () .time ()
114
114
assert not await lock2 .acquire ()
115
115
# The elapsed duration should be less than the total blocking_timeout
116
- assert bt >= (event_loop .time () - start ) > bt - sleep
116
+ assert bt >= (asyncio . get_running_loop () .time () - start ) > bt - sleep
117
117
await lock1 .release ()
118
118
119
119
async def test_context_manager (self , r ):
You can’t perform that action at this time.
0 commit comments