File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ def wrapper(*args, **kwargs):
352352
353353@_reap_children_on_err
354354def spawn_testproc (cmd = None , ** kwds ):
355- """Creates a python subprocess which does nothing for 60 secs and
355+ """Create a python subprocess which does nothing for some secs and
356356 return it as a subprocess.Popen instance.
357357 If "cmd" is specified that is used instead of python.
358358 By default stdin and stdout are redirected to /dev/null.
@@ -371,13 +371,13 @@ def spawn_testproc(cmd=None, **kwds):
371371 CREATE_NO_WINDOW = 0x8000000
372372 kwds .setdefault ("creationflags" , CREATE_NO_WINDOW )
373373 if cmd is None :
374- testfn = get_testfn ()
374+ testfn = get_testfn (dir = os . getcwd () )
375375 try :
376376 safe_rmpath (testfn )
377377 pyline = (
378- "from time import sleep ;"
378+ "import time ;"
379379 + "open(r'%s', 'w').close();" % testfn
380- + "[sleep(0.1) for x in range(100)];" # 10 secs
380+ + "[time. sleep(0.1) for x in range(100)];" # 10 secs
381381 )
382382 cmd = [PYTHON_EXE , "-c" , pyline ]
383383 sproc = subprocess .Popen (cmd , ** kwds )
You can’t perform that action at this time.
0 commit comments