@@ -295,31 +295,31 @@ def bar(x):
295295 expected = "(30, None, [\' def foo(x):\\ n\' , \' return x + 1\\ n\' , \' \\ n\' ], \' <stdin>\' )"
296296 self .assertIn (expected , output , expected )
297297
298- def test_asyncio_repl_respects_isolated_mode (self ):
298+ def test_asyncio_repl_reaches_python_startup_script (self ):
299299 with os_helper .temp_dir () as tmpdir :
300300 script = os .path .join (tmpdir , "pythonstartup.py" )
301301 with open (script , "w" ) as f :
302- f .write ("print('should not print ')\n " )
302+ f .write ("print('pythonstartup done! ')\n " )
303303 env = os .environ .copy ()
304304 env ["PYTHON_HISTORY" ] = os .path .join (tmpdir , ".asyncio_history" )
305305 env ["PYTHONSTARTUP" ] = script
306- p = spawn_asyncio_repl (isolated = True , env = env )
306+ p = spawn_asyncio_repl (env = env )
307307 output = kill_python (p )
308308 self .assertEqual (p .returncode , 0 )
309- self .assertNotIn ( "should not print " , output )
309+ self .assertIn ( "pythonstartup done! " , output )
310310
311- def test_asyncio_repl_reaches_python_startup_script (self ):
311+ def test_asyncio_repl_respects_isolated_mode (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! ')\n " )
315+ f .write ("print('should not print ')\n " )
316316 env = os .environ .copy ()
317317 env ["PYTHON_HISTORY" ] = os .path .join (tmpdir , ".asyncio_history" )
318318 env ["PYTHONSTARTUP" ] = script
319- p = spawn_asyncio_repl (env = env )
319+ p = spawn_asyncio_repl (isolated = True , env = env )
320320 output = kill_python (p )
321321 self .assertEqual (p .returncode , 0 )
322- self .assertIn ( "pythonstartup done! " , output )
322+ self .assertNotIn ( "should not print " , output )
323323
324324 @unittest .skipUnless (pty , "requires pty" )
325325 def test_asyncio_repl_is_ok (self ):
0 commit comments