MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_acquire_timeout

Method test_acquire_timeout

python/python3/tornado/test/locks_test.py:502–509  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

500
501 @gen_test
502 def test_acquire_timeout(self):
503 lock = locks.Lock()
504 lock.acquire()
505 with self.assertRaises(gen.TimeoutError):
506 yield lock.acquire(timeout=timedelta(seconds=0.01))
507
508 # Still locked.
509 self.assertFalse(asyncio.ensure_future(lock.acquire()).done())
510
511 def test_multi_release(self):
512 lock = locks.Lock()

Callers

nothing calls this directly

Calls 2

acquireMethod · 0.95
doneMethod · 0.45

Tested by

no test coverage detected