8000 gh-111347: Remove wrong assertion in test_sendfile by zcxsythenew · Pull Request #111377 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111347: Remove wrong assertion in test_sendfile #111377

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 4 commits into from
Oct 29, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
gh-111347: Remove wrong assertion in test_sendfile
  • Loading branch information
zcxsythenew committed Oct 27, 2023
commit 272ab330629cb6125b10d8e83b1171fa84309d01
4 changes: 4 additions & 0 deletions Lib/test/test_asyncio/test_sendfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ def test_sendfile_close_peer_in_the_middle_of_receiving(self):

self.assertTrue(1024 <= srv_proto.nbytes < len(self.DATA),
srv_proto.nbytes)
if sys.platform != 'win32' or \
not isinstance(self.loop, asyncio.ProactorEventLoop):
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