mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Remove a couple of local imports.
This commit is contained in:
parent
6c64cc1973
commit
5bb9a8f237
1 changed files with 4 additions and 5 deletions
|
@ -2494,15 +2494,14 @@ class TestWait(unittest.TestCase):
|
||||||
w.close()
|
w.close()
|
||||||
|
|
||||||
def test_wait(self, slow=False):
|
def test_wait(self, slow=False):
|
||||||
from multiprocessing import Pipe, Process
|
|
||||||
from multiprocessing.connection import wait
|
from multiprocessing.connection import wait
|
||||||
readers = []
|
readers = []
|
||||||
procs = []
|
procs = []
|
||||||
messages = []
|
messages = []
|
||||||
|
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
r, w = Pipe(duplex=False)
|
r, w = multiprocessing.Pipe(duplex=False)
|
||||||
p = Process(target=self._child_test_wait, args=(w, slow))
|
p = multiprocessing.Process(target=self._child_test_wait, args=(w, slow))
|
||||||
p.daemon = True
|
p.daemon = True
|
||||||
p.start()
|
p.start()
|
||||||
w.close()
|
w.close()
|
||||||
|
@ -2535,7 +2534,6 @@ class TestWait(unittest.TestCase):
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
def test_wait_socket(self, slow=False):
|
def test_wait_socket(self, slow=False):
|
||||||
from multiprocessing import Process
|
|
||||||
from multiprocessing.connection import wait
|
from multiprocessing.connection import wait
|
||||||
l = socket.socket()
|
l = socket.socket()
|
||||||
l.bind(('', 0))
|
l.bind(('', 0))
|
||||||
|
@ -2546,7 +2544,8 @@ class TestWait(unittest.TestCase):
|
||||||
dic = {}
|
dic = {}
|
||||||
|
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
p = Process(target=self._child_test_wait_socket, args=(addr, slow))
|
p = multiprocessing.Process(target=self._child_test_wait_socket,
|
||||||
|
args=(addr, slow))
|
||||||
p.daemon = True
|
p.daemon = True
|
||||||
p.start()
|
p.start()
|
||||||
procs.append(p)
|
procs.append(p)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue