diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-04 01:56:53 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-04 01:56:53 +0000 |
commit | 49fb6e53b35f991d79caadbb6320a39452944b4d (patch) | |
tree | 292e2ceaf2555d9b404e96fa4da53af38073e7ac /tests | |
parent | f1c6ad46afa3eaf6df999cd51eb406110b6cac69 (diff) | |
download | micropython-49fb6e53b35f991d79caadbb6320a39452944b4d.tar.gz micropython-49fb6e53b35f991d79caadbb6320a39452944b4d.zip |
Implements list.remove (in terms of list.index and list.pop).
Fixes issue #63.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basics/tests/list_remove.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/tests/list_remove.py b/tests/basics/tests/list_remove.py new file mode 100644 index 0000000000..81b2b3d973 --- /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") |