mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)
This commit is contained in:
parent
2b47af6398
commit
d59d7374a3
4 changed files with 14 additions and 0 deletions
|
@ -6446,6 +6446,12 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
|
|||
sock.bind(("type", "n" * 64))
|
||||
|
||||
|
||||
@unittest.skipUnless(sys.platform == 'darwin', 'macOS specific test')
|
||||
class TestMacOSTCPFlags(unittest.TestCase):
|
||||
def test_tcp_keepalive(self):
|
||||
self.assertTrue(socket.TCP_KEEPALIVE)
|
||||
|
||||
|
||||
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
|
||||
class TestMSWindowsTCPFlags(unittest.TestCase):
|
||||
knownTCPFlags = {
|
||||
|
@ -6704,6 +6710,7 @@ def test_main():
|
|||
SendfileUsingSendfileTest,
|
||||
])
|
||||
tests.append(TestMSWindowsTCPFlags)
|
||||
tests.append(TestMacOSTCPFlags)
|
||||
|
||||
thread_info = threading_helper.threading_setup()
|
||||
support.run_unittest(*tests)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue