From cc6ef3620fd368b639540ff4c2d92d7e84fc1f6b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 29 Sep 2013 11:08:04 -0400 Subject: [PATCH] move helper function into its test method (closes #19112) --- Lib/test/test_multiprocessing.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 57609695981..a19bca0929c 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -3123,13 +3123,6 @@ def _ThisSubProcess(q): except pyqueue.Empty: pass -def _TestProcess(q): - queue = multiprocessing.Queue() - subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,)) - subProc.daemon = True - subProc.start() - subProc.join() - def _afunc(x): return x*x @@ -3163,6 +3156,12 @@ class _file_like(object): class TestStdinBadfiledescriptor(unittest.TestCase): def test_queue_in_process(self): + def _TestProcess(q): + queue = multiprocessing.Queue() + subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,)) + subProc.daemon = True + subProc.start() + subProc.join() queue = multiprocessing.Queue() proc = multiprocessing.Process(target=_TestProcess, args=(queue,)) proc.start()