Fix error message in objsequence.get_item

This commit is contained in:
clemado1 committed 2020-08-12 23:21:03 +09:00
1 parent 1011f48012
commit 6523abcac1
3 files changed
+2 -6

No files matched your search

-2
View File
@@ -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"
-2
View File
@@ -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"
+2 -2
View File
@@ -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
)))
}
}