(self)
| 563 | self.assertTrue(r) |
| 564 | |
| 565 | def test_set_and_clear(self): |
| 566 | # gh-57711: check that wait() returns true even when the event is |
| 567 | # cleared before the waiting thread is woken up. |
| 568 | event = self.eventtype() |
| 569 | results = [] |
| 570 | def f(): |
| 571 | results.append(event.wait(support.LONG_TIMEOUT)) |
| 572 | |
| 573 | N = 5 |
| 574 | with Bunch(f, N): |
| 575 | # Threads blocked on event.wait() |
| 576 | wait_threads_blocked(N) |
| 577 | |
| 578 | # Threads unblocked |
| 579 | event.set() |
| 580 | event.clear() |
| 581 | |
| 582 | self.assertEqual(results, [True] * N) |
| 583 | |
| 584 | @requires_fork |
| 585 | def test_at_fork_reinit(self): |
nothing calls this directly
no test coverage detected