mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-35934: Add socket.create_server() utility function (GH-11784)
This commit is contained in:
parent
58721a9030
commit
eb7e29f2a9
17 changed files with 289 additions and 88 deletions
|
@ -3334,9 +3334,7 @@ class _TestPicklingConnections(BaseTestCase):
|
|||
new_conn.close()
|
||||
l.close()
|
||||
|
||||
l = socket.socket()
|
||||
l.bind((test.support.HOST, 0))
|
||||
l.listen()
|
||||
l = socket.create_server((test.support.HOST, 0))
|
||||
conn.send(l.getsockname())
|
||||
new_conn, addr = l.accept()
|
||||
conn.send(new_conn)
|
||||
|
@ -4345,9 +4343,7 @@ class TestWait(unittest.TestCase):
|
|||
|
||||
def test_wait_socket(self, slow=False):
|
||||
from multiprocessing.connection import wait
|
||||
l = socket.socket()
|
||||
l.bind((test.support.HOST, 0))
|
||||
l.listen()
|
||||
l = socket.create_server((test.support.HOST, 0))
|
||||
addr = l.getsockname()
|
||||
readers = []
|
||||
procs = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue