File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -312,19 +312,14 @@ def test_asyncio_repl_reaches_python_startup_script(self):
312312 with os_helper .temp_dir () as tmpdir :
313313 script = os .path .join (tmpdir , "pythonstartup.py" )
314314 with open (script , "w" ) as f :
315- f .write ("print('pythonstartup done!')" + os .linesep )
316- f .write ("exit(0)" + os .linesep )
317-
315+ f .write ("print('pythonstartup done!')\n " )
318316 env = os .environ .copy ()
319317 env ["PYTHON_HISTORY" ] = os .path .join (tmpdir , ".asyncio_history" )
320318 env ["PYTHONSTARTUP" ] = script
321- subprocess .check_call (
322- [sys .executable , "-m" , "asyncio" ],
323- stdout = subprocess .PIPE ,
324- stderr = subprocess .PIPE ,
325- env = env ,
326- timeout = SHORT_TIMEOUT ,
327- )
319+ p = spawn_asyncio_repl (env = env )
320+ output = kill_python (p )
321+ self .assertEqual (p .returncode , 0 )
322+ self .assertIn ("pythonstartup done!" , output )
328323
329324 @unittest .skipUnless (pty , "requires pty" )
330325 def test_asyncio_repl_is_ok (self ):
You can’t perform that action at this time.
0 commit comments