[3.11] gh-111347: Remove wrong assertion in test_sendfile (GH-111377) (#111462)

gh-111347: Remove wrong assertion in test_sendfile (GH-111377)

Windows is different.
(cherry picked from commit fa35b9e89b)

Co-authored-by: zcxsythenew <30565051+zcxsythenew@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-10-31 02:14:30 +01:00 committed by GitHub
parent 78150c6f7b
commit a9d5966bce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -470,8 +470,11 @@ def test_sendfile_close_peer_in_the_middle_of_receiving(self):
self.assertTrue(1024 <= srv_proto.nbytes < len(self.DATA),
srv_proto.nbytes)
self.assertTrue(1024 <= self.file.tell() < len(self.DATA),
self.file.tell())
if not (sys.platform == 'win32'
and isinstance(self.loop, asyncio.ProactorEventLoop)):
# On Windows, Proactor uses transmitFile, which does not update tell()
self.assertTrue(1024 <= self.file.tell() < len(self.DATA),
self.file.tell())
self.assertTrue(cli_proto.transport.is_closing())
def test_sendfile_fallback_close_peer_in_the_middle_of_receiving(self):