()
| 6 | |
| 7 | |
| 8 | def test_queue(): |
| 9 | queue = NotifyingQueue() |
| 10 | assert queue.copy() == [] |
| 11 | |
| 12 | queue.put(1) |
| 13 | assert queue.copy() == [1] |
| 14 | assert queue.peek() == 1, "copy must preserve the queue" |
| 15 | |
| 16 | queue.put(2) |
| 17 | assert queue.copy() == [1, 2], "copy must preserve the items order" |
| 18 | assert queue.peek() == 1, "copy must preserve the queue" |
| 19 | |
| 20 | assert queue.get() == 1, "get should return first item" |
| 21 | assert queue.peek() == 2, "get must remove first item" |
| 22 | |
| 23 | |
| 24 | def test_not_empty(): |
nothing calls this directly
no test coverage detected