Skip to content

Commit 08aae03

Browse files
committed
Fix pytests
1 parent afdda4e commit 08aae03

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

data_structures/queues/circular_queue.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def __len__(self) -> int:
1717
>>> len(cq)
1818
0
1919
>>> cq.enqueue("A") # doctest: +ELLIPSIS
20-
<data_structures.queue.circular_queue.CircularQueue object at ...
20+
<data_structures.queues.circular_queue.CircularQueue object at ...
21+
>>> cq.array
22+
['A', None, None, None, None]
2123
>>> len(cq)
2224
1
2325
"""
@@ -51,11 +53,13 @@ def enqueue(self, data):
5153
as an index.
5254
>>> cq = CircularQueue(5)
5355
>>> cq.enqueue("A") # doctest: +ELLIPSIS
54-
<data_structures.queue.circular_queue.CircularQueue object at ...
56+
<data_structures.queues.circular_queue.CircularQueue object at ...
5557
>>> (cq.size, cq.first())
5658
(1, 'A')
5759
>>> cq.enqueue("B") # doctest: +ELLIPSIS
58-
<data_structures.queue.circular_queue.CircularQueue object at ...
60+
<data_structures.queues.circular_queue.CircularQueue object at ...
61+
>>> cq.array
62+
['A', 'B', None, None, None]
5963
>>> (cq.size, cq.first())
6064
(2, 'A')
6165
"""

data_structures/queues/priority_queue_using_list.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class FixedPriorityQueue:
5959
>>> fpq.dequeue()
6060
Traceback (most recent call last):
6161
...
62-
data_structures.queue.priority_queue_using_list.UnderFlowError: All queues are empty
62+
data_structures.queues.priority_queue_using_list.UnderFlowError: All queues are empty
6363
>>> print(fpq)
6464
Priority 0: []
6565
Priority 1: []
@@ -141,7 +141,7 @@ class ElementPriorityQueue:
141141
>>> epq.dequeue()
142142
Traceback (most recent call last):
143143
...
144-
data_structures.queue.priority_queue_using_list.UnderFlowError: The queue is empty
144+
data_structures.queues.priority_queue_using_list.UnderFlowError: The queue is empty
145145
>>> print(epq)
146146
[]
147147
"""

0 commit comments

Comments
 (0)