File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3117,12 +3117,19 @@ def test_pool_initializer(self):
31173117# Verifies os.close(sys.stdin.fileno) vs. sys.stdin.close() behavior
31183118#
31193119
3120- def _ThisSubProcess (q ):
3120+ def _this_sub_process (q ):
31213121 try :
31223122 item = q .get (block = False )
31233123 except pyqueue .Empty :
31243124 pass
31253125
3126+ def _test_process (q ):
3127+ queue = multiprocessing .Queue ()
3128+ subProc = multiprocessing .Process (target = _this_sub_process , args = (queue ,))
3129+ subProc .daemon = True
3130+ subProc .start ()
3131+ subProc .join ()
3132+
31263133def _afunc (x ):
31273134 return x * x
31283135
@@ -3156,14 +3163,8 @@ def flush(self):
31563163class TestStdinBadfiledescriptor (unittest .TestCase ):
31573164
31583165 def test_queue_in_process (self ):
3159- def _TestProcess (q ):
3160- queue = multiprocessing .Queue ()
3161- subProc = multiprocessing .Process (target = _ThisSubProcess , args = (queue ,))
3162- subProc .daemon = True
3163- subProc .start ()
3164- subProc .join ()
31653166 queue = multiprocessing .Queue ()
3166- proc = multiprocessing .Process (target = _TestProcess , args = (queue ,))
3167+ proc = multiprocessing .Process (target = _test_process , args = (queue ,))
31673168 proc .start ()
31683169 proc .join ()
31693170
You can’t perform that action at this time.
0 commit comments