Skip to content

Commit dc1b0f6

Browse files
committed
more tests
1 parent 0228a6d commit dc1b0f6

File tree

1 file changed

+26
-0
lines changed
  • computer_science/data_structures/queue

1 file changed

+26
-0
lines changed

computer_science/data_structures/queue/queue.py

+26
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,29 @@ def test_back(queue):
104104

105105
test_emptiness(queue) # True
106106
test_size(queue) # 0
107+
108+
# Other test
109+
queue = Queue()
110+
queue.enqueue(1)
111+
queue.enqueue(2)
112+
queue.enqueue(3)
113+
queue.enqueue(4)
114+
queue.enqueue(5)
115+
116+
for item in queue.items:
117+
print(item)
118+
119+
test_front(queue)
120+
test_back(queue)
121+
122+
queue.dequeue()
123+
test_front(queue)
124+
125+
queue.dequeue()
126+
test_size(queue)
127+
128+
while not queue.is_empty():
129+
test_front(queue)
130+
queue.dequeue()
131+
132+
test_size(queue)

0 commit comments

Comments
 (0)