Skip to content

Commit 5588ef3

Browse files
committed
fixes issue #67 - replace AssertionError with False and respective error string
1 parent 7370a93 commit 5588ef3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

grumpy-runtime-src/testing/list_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@
5050
assert a == [0]
5151
try:
5252
a.pop(5)
53-
assert AssertionError
53+
assert False, "Exception: 'pop index out of range' was not raised"
5454
except IndexError:
5555
pass
5656
assert a.pop(0) == 0
5757
assert a == []
5858
try:
5959
a.pop()
60-
assert AssertionError
60+
assert False, "Exception: 'pop from empty list' was not raised"
6161
except IndexError:
6262
pass
6363
try:
6464
a.pop(42, 42)
65-
assert AssertionError
65+
assert False, "Exception: 'pop takes at most 1 argument' was not raised"
6666
except TypeError:
6767
pass
6868
a = [-1, 0, 1]
@@ -89,13 +89,13 @@
8989

9090
try:
9191
a.extend()
92-
assert AssertionError
92+
assert False, "Exception: 'extend() takes exactly one argument' was not raised"
9393
except TypeError:
9494
pass
9595

9696
try:
9797
a.extend([], [])
98-
assert AssertionError
98+
assert False, "Exception: 'extend() takes exactly one argument' was not raised"
9999
except TypeError:
100100
pass
101101

@@ -107,6 +107,6 @@
107107

108108
try:
109109
[].count()
110-
assert AssertionError
110+
assert False, "Exception: 'count() takes exactly one argument' was not raised"
111111
except TypeError:
112112
pass

0 commit comments

Comments
 (0)