@@ -123,7 +123,7 @@ def _check_script(self, script_name, expected_file,
123123 if not __debug__ :
124124 cmd_line_switches += ('-' + 'O' * sys .flags .optimize ,)
125125 run_args = cmd_line_switches + (script_name ,) + tuple (example_args )
126- rc , out , err = assert_python_ok (* run_args )
126+ rc , out , err = assert_python_ok (* run_args , __isolated = False )
127127 self ._check_output (script_name , rc , out + err , expected_file ,
128128 expected_argv0 , expected_path0 ,
129129 expected_package , expected_loader )
@@ -294,7 +294,7 @@ def test_issue8202(self):
294294 pkg_dir = os .path .join (script_dir , 'test_pkg' )
295295 make_pkg (pkg_dir , "import sys; print('init_argv0==%r' % sys.argv[0])" )
296296 script_name = _make_test_script (pkg_dir , 'script' )
297- rc , out , err = assert_python_ok ('-m' , 'test_pkg.script' , * example_args )
297+ rc , out , err = assert_python_ok ('-m' , 'test_pkg.script' , * example_args , __isolated = False )
298298 if verbose > 1 :
299299 print (out )
300300 expected = "init_argv0==%r" % '-m'
@@ -311,7 +311,8 @@ def test_issue8202_dash_c_file_ignored(self):
311311 with open ("-c" , "w" ) as f :
312312 f .write ("data" )
313313 rc , out , err = assert_python_ok ('-c' ,
314- 'import sys; print("sys.path[0]==%r" % sys.path[0])' )
314+ 'import sys; print("sys.path[0]==%r" % sys.path[0])' ,
315+ __isolated = False )
315316 if verbose > 1 :
316317 print (out )
317318 expected = "sys.path[0]==%r" % ''
@@ -325,7 +326,8 @@ def test_issue8202_dash_m_file_ignored(self):
325326 with support .change_cwd (path = script_dir ):
326327 with open ("-m" , "w" ) as f :
327328 f .write ("data" )
328- rc , out , err = assert_python_ok ('-m' , 'other' , * example_args )
329+ rc , out , err = assert_python_ok ('-m' , 'other' , * example_args ,
330+ __isolated = False )
329331 self ._check_output (script_name , rc , out ,
330332 script_name , script_name , '' , '' ,
331333 importlib .machinery .SourceFileLoader )
0 commit comments