(self)
| 946 | t.join() |
| 947 | |
| 948 | def test_BoundedSemaphore_limit(self): |
| 949 | # BoundedSemaphore should raise ValueError if released too often. |
| 950 | for limit in range(1, 10): |
| 951 | bs = threading.BoundedSemaphore(limit) |
| 952 | threads = [threading.Thread(target=bs.acquire) |
| 953 | for _ in range(limit)] |
| 954 | for t in threads: |
| 955 | t.start() |
| 956 | for t in threads: |
| 957 | t.join() |
| 958 | threads = [threading.Thread(target=bs.release) |
| 959 | for _ in range(limit)] |
| 960 | for t in threads: |
| 961 | t.start() |
| 962 | for t in threads: |
| 963 | t.join() |
| 964 | self.assertRaises(ValueError, bs.release) |
| 965 | |
| 966 | @cpython_only |
| 967 | def test_frame_tstate_tracing(self): |
nothing calls this directly
no test coverage detected