mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #18743: Fix references to non-existant "StringIO" module
in docstrings and comments.
This commit is contained in:
parent
15e6590774
commit
50254c57cd
8 changed files with 15 additions and 21 deletions
|
@ -51,8 +51,8 @@ class EPipeSocket(FakeSocket):
|
|||
def close(self):
|
||||
pass
|
||||
|
||||
class NoEOFStringIO(io.BytesIO):
|
||||
"""Like StringIO, but raises AssertionError on EOF.
|
||||
class NoEOFBytesIO(io.BytesIO):
|
||||
"""Like BytesIO, but raises AssertionError on EOF.
|
||||
|
||||
This is used below to test that http.client doesn't try to read
|
||||
more from the underlying file than it should.
|
||||
|
@ -324,7 +324,7 @@ class BasicTest(TestCase):
|
|||
'HTTP/1.1 200 OK\r\n'
|
||||
'Content-Length: 14432\r\n'
|
||||
'\r\n',
|
||||
NoEOFStringIO)
|
||||
NoEOFBytesIO)
|
||||
resp = client.HTTPResponse(sock, method="HEAD")
|
||||
resp.begin()
|
||||
if resp.read():
|
||||
|
@ -337,7 +337,7 @@ class BasicTest(TestCase):
|
|||
'HTTP/1.1 200 OK\r\n'
|
||||
'Content-Length: 14432\r\n'
|
||||
'\r\n',
|
||||
NoEOFStringIO)
|
||||
NoEOFBytesIO)
|
||||
resp = client.HTTPResponse(sock, method="HEAD")
|
||||
resp.begin()
|
||||
b = bytearray(5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue