gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227)
The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a758424566)
Co-authored-by: Xi Ruoyao <xry111@xry111.site>
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>
* Move socket related functions from test.support to socket_helper.
* Import socket, nntplib and urllib.error lazily in transient_internet().
* Remove importing multiprocess.
test_asyncio/test_sendfile.py now resets the event loop policy using
tearDownModule() as done in other tests, to prevent a warning when
running tests on Windows.