File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2627,6 +2627,8 @@ def test_execve_invalid_env(self):
26272627 # See https://github.com/python/cpython/issues/137934 and the other
26282628 # related issues for the reason why we cannot test this on Windows.
26292629 @unittest .skipIf (os .name == "nt" , "POSIX-specific test" )
2630+ @unittest .skipUnless (unix_shell and os .path .exists (unix_shell ),
2631+ "requires a shell" )
26302632 def test_execve_env_concurrent_mutation_with_fspath_posix (self ):
26312633 # Prevent crash when mutating environment during parsing.
26322634 # Regression test for https://github.com/python/cpython/issues/143309.
@@ -2648,9 +2650,9 @@ def __len__(self): return 1
26482650 def keys(self): return KEYS
26492651 def values(self): return VALUES
26502652
2651- args = [sys.executable , '-c', "print( {message!r})" ]
2653+ args = [{unix_shell!r} , '-c', 'echo \" {message!s} \" ' ]
26522654 os.execve(args[0], args, MyEnv())
2653- """ .format (message = message )
2655+ """ .format (unix_shell = unix_shell , message = message )
26542656
26552657 # Use '__cleanenv' to signal to assert_python_ok() not
26562658 # to do a copy of os.environ on its own.
You can’t perform that action at this time.
0 commit comments