diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index 249249f60..a45cac649 100644 --- a/Lib/test/list_tests.py +++ b/Lib/test/list_tests.py @@ -33,8 +33,6 @@ class CommonTest(seq_tests.CommonTest): self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_getitem_error(self): a = [] msg = "list indices must be integers or slices" diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py index 5d7b9980a..c4a0d5f1b 100644 --- a/Lib/test/test_tuple.py +++ b/Lib/test/test_tuple.py @@ -18,8 +18,6 @@ JUST_SHOW_HASH_RESULTS = False # if RUN_ALL_HASH_TESTS, just display class TupleTest(seq_tests.CommonTest): type2test = tuple - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_getitem_error(self): t = () msg = "tuple indices must be integers or slices" diff --git a/vm/src/obj/objsequence.rs b/vm/src/obj/objsequence.rs index ebb07c336..1016cb32a 100644 --- a/vm/src/obj/objsequence.rs +++ b/vm/src/obj/objsequence.rs @@ -252,8 +252,8 @@ pub fn get_item( } } else { Err(vm.new_type_error(format!( - "indexing type {:?} with index {:?} is not supported (yet?)", - sequence, subscript + "{} indices must be integers or slices", + sequence.lease_class().name ))) } }