@@ -17,7 +17,7 @@ def __len__(self) -> int:
1717 >>> len(cq)
1818 0
1919 >>> cq.enqueue("A") # doctest: +ELLIPSIS
20- <data_structures.queues.circular_queue.CircularQueue object at ...
20+ <data_structures.queues.circular_queue.CircularQueue object at ...>
2121 >>> cq.array
2222 ['A', None, None, None, None]
2323 >>> len(cq)
@@ -51,17 +51,24 @@ def enqueue(self, data):
5151 """
5252 This function inserts an element at the end of the queue using self.rear value
5353 as an index.
54+
5455 >>> cq = CircularQueue(5)
5556 >>> cq.enqueue("A") # doctest: +ELLIPSIS
56- <data_structures.queues.circular_queue.CircularQueue object at ...
57+ <data_structures.queues.circular_queue.CircularQueue object at ...>
5758 >>> (cq.size, cq.first())
5859 (1, 'A')
5960 >>> cq.enqueue("B") # doctest: +ELLIPSIS
60- <data_structures.queues.circular_queue.CircularQueue object at ...
61+ <data_structures.queues.circular_queue.CircularQueue object at ...>
6162 >>> cq.array
6263 ['A', 'B', None, None, None]
6364 >>> (cq.size, cq.first())
6465 (2, 'A')
66+ >>> cq.enqueue("C").enqueue("D").enqueue("E") # doctest: +ELLIPSIS
67+ <data_structures.queues.circular_queue.CircularQueue object at ...>
68+ >>> cq.enqueue("F")
69+ Traceback (most recent call last):
70+ ...
71+ Exception: QUEUE IS FULL
6572 """
6673 if self .size >= self .n :
6774 raise Exception ("QUEUE IS FULL" )
@@ -75,6 +82,7 @@ def dequeue(self):
7582 """
7683 This function removes an element from the queue using on self.front value as an
7784 index and returns it
85+
7886 >>> cq = CircularQueue(5)
7987 >>> cq.dequeue()
8088 Traceback (most recent call last):
0 commit comments