File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def pop(self):
41
41
>>> Stack().pop()
42
42
Traceback (most recent call last):
43
43
...
44
- StackUnderflowError
44
+ data_structures.stacks.stack. StackUnderflowError
45
45
"""
46
46
if not self .stack :
47
47
raise StackUnderflowError
@@ -54,7 +54,7 @@ def peek(self):
54
54
>>> Stack().pop()
55
55
Traceback (most recent call last):
56
56
...
57
- StackUnderflowError
57
+ data_structures.stacks.stack. StackUnderflowError
58
58
"""
59
59
if not self .stack :
60
60
raise StackUnderflowError
@@ -89,13 +89,13 @@ def test_stack() -> None:
89
89
try :
90
90
_ = stack .pop ()
91
91
assert False # This should not happen
92
- except IndexError :
92
+ except StackUnderflowError :
93
93
assert True # This should happen
94
94
95
95
try :
96
96
_ = stack .peek ()
97
97
assert False # This should not happen
98
- except IndexError :
98
+ except StackUnderflowError :
99
99
assert True # This should happen
100
100
101
101
for i in range (10 ):
You can’t perform that action at this time.
0 commit comments