(self)
| 66 | self.assertEqual(stderr, '') |
| 67 | |
| 68 | def test_bind_release(self): |
| 69 | with self.subTest('typical'): |
| 70 | qid = _queues.create(2, REPLACE, -1) |
| 71 | _queues.bind(qid) |
| 72 | _queues.release(qid) |
| 73 | self.assertEqual(get_num_queues(), 0) |
| 74 | |
| 75 | with self.subTest('bind too much'): |
| 76 | qid = _queues.create(2, REPLACE, -1) |
| 77 | _queues.bind(qid) |
| 78 | _queues.bind(qid) |
| 79 | _queues.release(qid) |
| 80 | _queues.destroy(qid) |
| 81 | self.assertEqual(get_num_queues(), 0) |
| 82 | |
| 83 | with self.subTest('nested'): |
| 84 | qid = _queues.create(2, REPLACE, -1) |
| 85 | _queues.bind(qid) |
| 86 | _queues.bind(qid) |
| 87 | _queues.release(qid) |
| 88 | _queues.release(qid) |
| 89 | self.assertEqual(get_num_queues(), 0) |
| 90 | |
| 91 | with self.subTest('release without binding'): |
| 92 | qid = _queues.create(2, REPLACE, -1) |
| 93 | with self.assertRaises(queues.QueueError): |
| 94 | _queues.release(qid) |
| 95 | |
| 96 | |
| 97 | class QueueTests(TestBase): |
nothing calls this directly
no test coverage detected