mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix error message in objsequence.get_item
This commit is contained in:
1 parent
1011f48012
commit
6523abcac1
3 files changed
+2
-6
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user