From 49fb6e53b35f991d79caadbb6320a39452944b4d Mon Sep 17 00:00:00 2001 From: John R. Lenton Date: Sat, 4 Jan 2014 01:56:53 +0000 Subject: Implements list.remove (in terms of list.index and list.pop). Fixes issue #63. --- tests/basics/tests/list_remove.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/basics/tests/list_remove.py (limited to 'tests') diff --git a/tests/basics/tests/list_remove.py b/tests/basics/tests/list_remove.py new file mode 100644 index 000000000..81b2b3d97 --- /dev/null +++ b/tests/basics/tests/list_remove.py @@ -0,0 +1,9 @@ +a = [1, 2, 3] +print(a.remove(2)) +print(a) +try: + a.remove(2) +except ValueError: + print("Raised ValueError") +else: + raise AssertionError("Did not raise ValueError") -- cgit v1.2.3