Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions grumpy-runtime-src/testing/list_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@
assert a == [0]
try:
a.pop(5)
assert AssertionError
assert False, "Exception: 'pop index out of range' was not raised"
except IndexError:
pass
assert a.pop(0) == 0
assert a == []
try:
a.pop()
assert AssertionError
assert False, "Exception: 'pop from empty list' was not raised"
except IndexError:
pass
try:
a.pop(42, 42)
assert AssertionError
assert False, "Exception: 'pop takes at most 1 argument' was not raised"
except TypeError:
pass
a = [-1, 0, 1]
Expand All @@ -89,13 +89,13 @@

try:
a.extend()
assert AssertionError
assert False, "Exception: 'extend() takes exactly one argument' was not raised"
except TypeError:
pass

try:
a.extend([], [])
assert AssertionError
assert False, "Exception: 'extend() takes exactly one argument' was not raised"
except TypeError:
pass

Expand All @@ -107,6 +107,6 @@

try:
[].count()
assert AssertionError
assert False, "Exception: 'count() takes exactly one argument' was not raised"
except TypeError:
pass