(self)
| 73 | self.assertEqual(["wait1", "notify1", "wait2", "notify2"], self.history) |
| 74 | |
| 75 | def test_notify_n(self): |
| 76 | c = locks.Condition() |
| 77 | for i in range(6): |
| 78 | self.record_done(c.wait(), i) |
| 79 | |
| 80 | c.notify(3) |
| 81 | self.loop_briefly() |
| 82 | |
| 83 | # Callbacks execute in the order they were registered. |
| 84 | self.assertEqual(list(range(3)), self.history) |
| 85 | c.notify(1) |
| 86 | self.loop_briefly() |
| 87 | self.assertEqual(list(range(4)), self.history) |
| 88 | c.notify(2) |
| 89 | self.loop_briefly() |
| 90 | self.assertEqual(list(range(6)), self.history) |
| 91 | |
| 92 | def test_notify_all(self): |
| 93 | c = locks.Condition() |
nothing calls this directly
no test coverage detected