mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module,
where supported by the system. Patch by Nikita Vetoshkin.
This commit is contained in:
parent
f4061dac60
commit
b1c5496738
9 changed files with 137 additions and 12 deletions
|
@ -692,7 +692,8 @@ class BaseTestAPI(unittest.TestCase):
|
|||
s = asyncore.dispatcher()
|
||||
s.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.assertEqual(s.socket.family, socket.AF_INET)
|
||||
self.assertEqual(s.socket.type, socket.SOCK_STREAM)
|
||||
SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', 0)
|
||||
self.assertEqual(s.socket.type, socket.SOCK_STREAM | SOCK_NONBLOCK)
|
||||
|
||||
def test_bind(self):
|
||||
s1 = asyncore.dispatcher()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue