def test_yield_sem(self):
# Ensure we catch a "with (yield sem)", which should be
# "with (yield sem.acquire())".
with self.assertRaises(gen.BadYieldError):
with (yield locks.Semaphore()):
pass
locks_test.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录