[Python-checkins] cpython: Remove a couple of local imports.
antoine.pitrou
python-checkins at python.org
Tue Mar 6 13:50:05 CET 2012
http://hg.python.org/cpython/rev/7069d0a55470
changeset: 75453:7069d0a55470
user: Antoine Pitrou <solipsis at pitrou.net>
date: Tue Mar 06 13:43:24 2012 +0100
summary:
Remove a couple of local imports.
files:
Lib/test/test_multiprocessing.py | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -2494,15 +2494,14 @@
w.close()
def test_wait(self, slow=False):
- from multiprocessing import Pipe, Process
from multiprocessing.connection import wait
readers = []
procs = []
messages = []
for i in range(4):
- r, w = Pipe(duplex=False)
- p = Process(target=self._child_test_wait, args=(w, slow))
+ r, w = multiprocessing.Pipe(duplex=False)
+ p = multiprocessing.Process(target=self._child_test_wait, args=(w, slow))
p.daemon = True
p.start()
w.close()
@@ -2535,7 +2534,6 @@
s.close()
def test_wait_socket(self, slow=False):
- from multiprocessing import Process
from multiprocessing.connection import wait
l = socket.socket()
l.bind(('', 0))
@@ -2546,7 +2544,8 @@
dic = {}
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.start()
procs.append(p)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list