From 5588ef35737363ed5f925a4035eb186b797f41c8 Mon Sep 17 00:00:00 2001 From: sri Date: Fri, 25 Oct 2019 17:55:30 -0700 Subject: [PATCH] fixes issue #67 - replace AssertionError with False and respective error string --- grumpy-runtime-src/testing/list_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/grumpy-runtime-src/testing/list_test.py b/grumpy-runtime-src/testing/list_test.py index 9ea2a3d8..59472555 100644 --- a/grumpy-runtime-src/testing/list_test.py +++ b/grumpy-runtime-src/testing/list_test.py @@ -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] @@ -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 @@ -107,6 +107,6 @@ try: [].count() - assert AssertionError + assert False, "Exception: 'count() takes exactly one argument' was not raised" except TypeError: pass