@@ -1400,23 +1400,19 @@ def test_inspect_keeps_globals_from_inspected_module(self):
14001400 @force_not_colorized
14011401 def test_python_basic_repl (self ):
14021402 env = os .environ .copy ()
1403- commands = ("from test.support import initialized_with_pyrepl\n "
1404- "initialized_with_pyrepl()\n "
1405- "exit()\n " )
1406-
1403+ pyrepl_commands = "clear\n exit()\n "
14071404 env .pop ("PYTHON_BASIC_REPL" , None )
1408- output , exit_code = self .run_repl (commands , env = env , skip = True )
1405+ output , exit_code = self .run_repl (pyrepl_commands , env = env , skip = True )
14091406 self .assertEqual (exit_code , 0 )
1410- self .assertIn ("True" , output )
1411- self .assertNotIn ("False" , output )
14121407 self .assertNotIn ("Exception" , output )
1408+ self .assertNotIn ("NameError" , output )
14131409 self .assertNotIn ("Traceback" , output )
14141410
1411+ basic_commands = "help\n exit()\n "
14151412 env ["PYTHON_BASIC_REPL" ] = "1"
1416- output , exit_code = self .run_repl (commands , env = env )
1413+ output , exit_code = self .run_repl (basic_commands , env = env )
14171414 self .assertEqual (exit_code , 0 )
1418- self .assertIn ("False" , output )
1419- self .assertNotIn ("True" , output )
1415+ self .assertIn ("Type help() for interactive help" , output )
14201416 self .assertNotIn ("Exception" , output )
14211417 self .assertNotIn ("Traceback" , output )
14221418
0 commit comments