(self)
| 963 | self.assertTimeout(dt, 0.5) |
| 964 | |
| 965 | def test_default_value(self): |
| 966 | # The default initial value is 1. |
| 967 | sem = self.semtype() |
| 968 | sem.acquire() |
| 969 | def f(): |
| 970 | sem.acquire() |
| 971 | sem.release() |
| 972 | |
| 973 | with Bunch(f, 1) as bunch: |
| 974 | # Thread blocked on sem.acquire() |
| 975 | wait_threads_blocked(1) |
| 976 | self.assertFalse(bunch.finished) |
| 977 | |
| 978 | # Thread unblocked |
| 979 | sem.release() |
| 980 | |
| 981 | def test_with(self): |
| 982 | sem = self.semtype(2) |
nothing calls this directly
no test coverage detected