Skip to content

Commit b2e28dd

Browse files
committed
oustside->outside, indent from web editor, use self.io
1 parent 1e40692 commit b2e28dd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Lib/test/test_io/test_general.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -593,20 +593,20 @@ def test_RawIOBase_read(self):
593593
self.assertEqual(rawio.read(2), b"")
594594

595595
def test_RawIOBase_read_bounds_checking(self):
596-
# Make sure a `.readinto` call which returns a value oustside
596+
# Make sure a `.readinto` call which returns a value outside
597597
# (0, len(buffer)) raises.
598-
class Misbehaved(io.RawIOBase):
598+
class Misbehaved(self.io.RawIOBase):
599599
def __init__(self, readinto_return) -> None:
600600
self._readinto_return = readinto_return
601601
def readinto(self, b):
602602
return self._readinto_return
603603

604604
with self.assertRaises(ValueError) as cm:
605605
Misbehaved(2).read(1)
606-
self.assertEqual(str(cm.exception), "readinto returned '2' oustside buffer size '1'")
606+
self.assertEqual(str(cm.exception), "readinto returned '2' outside buffer size '1'")
607607
for bad_size in (2147483647, sys.maxsize, -1, -1000):
608-
with self.assertRaises(ValueError):
609-
Misbehaved(bad_size).read()
608+
with self.assertRaises(ValueError):
609+
Misbehaved(bad_size).read()
610610

611611
def test_types_have_dict(self):
612612
test = (

Modules/_io/iobase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ _io__RawIOBase_read_impl(PyObject *self, Py_ssize_t n)
948948
if (bytes_filled < 0 || bytes_filled > n) {
949949
Py_DECREF(b);
950950
PyErr_Format(PyExc_ValueError,
951-
"readinto returned '%zd' oustside buffer size '%zd'",
951+
"readinto returned '%zd' outside buffer size '%zd'",
952952
bytes_filled, n);
953953
return NULL;
954954
}

0 commit comments

Comments
 (0)