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.
1 parent f082c53 commit 2cd0eadCopy full SHA for 2cd0ead
Lib/test/test_httplib.py
@@ -1081,8 +1081,17 @@ def test_chunked(self):
1081
self.assertEqual(resp.read(), expected)
1082
resp.close()
1083
1084
+ # explicit full read
1085
+ for n in (-1, None):
1086
+ with self.subTest('full read', n=n):
1087
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
1088
+ resp = client.HTTPResponse(sock, method="GET")
1089
+ resp.begin()
1090
+ self.assertEqual(resp.read(n), expected)
1091
+ resp.close()
1092
+
1093
# Various read sizes
- for n in list(range(1, 12)) + [-1, None]:
1094
+ for n in range(1, 12):
1095
sock = FakeSocket(chunked_start + last_chunk + chunked_end)
1096
resp = client.HTTPResponse(sock, method="GET")
1097
resp.begin()
0 commit comments