We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ceb7d68 + 4b659f9 commit 2e77581Copy full SHA for 2e77581
Lib/test/test_bytes.py
@@ -989,8 +989,6 @@ def test_sq_item(self):
989
class BytesTest(BaseBytesTest, unittest.TestCase):
990
type2test = bytes
991
992
- # TODO: RUSTPYTHON
993
- @unittest.expectedFailure
994
def test_getitem_error(self):
995
b = b'python'
996
msg = "byte indices must be integers or slices"
vm/src/builtins/bytes.rs
@@ -167,7 +167,7 @@ impl PyBytes {
167
}
168
169
fn _getitem(&self, needle: &PyObject, vm: &VirtualMachine) -> PyResult {
170
- match SequenceIndex::try_from_borrowed_object(vm, needle, "bytes")? {
+ match SequenceIndex::try_from_borrowed_object(vm, needle, "byte")? {
171
SequenceIndex::Int(i) => self
172
.inner
173
.elements
0 commit comments