aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 39d85e8df07..e7c4fa6cece 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -2160,6 +2160,17 @@ class SockSendfileMixin(SendfileBase):
async def wait_closed(self):
await self.fut
+ @classmethod
+ def setUpClass(cls):
+ cls.__old_bufsize = constants.SENDFILE_FALLBACK_READBUFFER_SIZE
+ constants.SENDFILE_FALLBACK_READBUFFER_SIZE = 1024 * 16
+ super().setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ constants.SENDFILE_FALLBACK_READBUFFER_SIZE = cls.__old_bufsize
+ super().tearDownClass()
+
def set_socket_opts(self, sock):
# On macOS, SO_SNDBUF is reset by connect(). So this method
# should be called after the socket is connected.