10000 [3.11] gh-111347: Remove wrong assertion in test_sendfile (GH-111377) by miss-islington · Pull Request #111462 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-111347: Remove wrong assertion in test_sendfile (GH-111377)
Windows is different.
(cherry picked from commit fa35b9e)

Co-authored-by: zcxsythenew <30565051+zcxsythenew@users.noreply.github.com>
  • Loading branch information
zcxsythenew authored and miss-islington committed Oct 29, 2023
commit 30b42076516b2f37f13188cb59ecb3b755eca384
7 changes: 5 additions & 2 deletions Lib/test/test_asyncio/test_sendfile.py
Or 68CF iginal file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
0