(self)
| 993 | t.join() |
| 994 | |
| 995 | def test_BoundedSemaphore_limit(self): |
| 996 | # BoundedSemaphore should raise ValueError if released too often. |
| 997 | for limit in range(1, 10): |
| 998 | bs = threading.BoundedSemaphore(limit) |
| 999 | threads = [threading.Thread(target=bs.acquire) |
| 1000 | for _ in range(limit)] |
| 1001 | for t in threads: |
| 1002 | t.start() |
| 1003 | for t in threads: |
| 1004 | t.join() |
| 1005 | threads = [threading.Thread(target=bs.release) |
| 1006 | for _ in range(limit)] |
| 1007 | for t in threads: |
| 1008 | t.start() |
| 1009 | for t in threads: |
| 1010 | t.join() |
| 1011 | self.assertRaises(ValueError, bs.release) |
| 1012 | |
| 1013 | @cpython_only |
| 1014 | def test_frame_tstate_tracing(self): |
nothing calls this directly
no test coverage detected