diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 6f1205322..be798fb2c 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -359,8 +359,6 @@ class ProcessTestCase(BaseTestCase): self._assert_python([doesnotexist, "-c"], executable=FakePath(sys.executable)) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_executable_takes_precedence(self): # Check that the executable argument takes precedence over args[0]. # @@ -371,6 +369,10 @@ class ProcessTestCase(BaseTestCase): self._assert_python, pre_args, executable=NONEXISTING_CMD[0]) + # TODO: RUSTPYTHON + if sys.platform != "win32": + test_executable_takes_precedence = unittest.expectedFailure(test_executable_takes_precedence) + @unittest.skipIf(mswindows, "executable argument replaces shell") def test_executable_replaces_shell(self): # Check that the executable argument replaces the default shell @@ -476,8 +478,6 @@ class ProcessTestCase(BaseTestCase): self._assert_cwd(python_dir, doesntexist, executable=rel_python, cwd=python_dir) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_cwd_with_absolute_arg(self): # Check that Popen can find the executable when the cwd is wrong # if args[0] is an absolute path. @@ -492,6 +492,10 @@ class ProcessTestCase(BaseTestCase): wrong_dir = self._normalize_cwd(wrong_dir) self._assert_cwd(wrong_dir, abs_python, cwd=wrong_dir) + # TODO: RUSTPYTHON + if sys.platform != "win32": + test_cwd_with_absolute_arg = unittest.expectedFailure(test_cwd_with_absolute_arg) + @unittest.skipIf(sys.base_prefix != sys.prefix, 'Test is not venv-compatible') def test_executable_with_cwd(self): @@ -1274,8 +1278,6 @@ class ProcessTestCase(BaseTestCase): with self.assertWarnsRegex(RuntimeWarning, 'line buffering'): self._test_bufsize_equal_one(line, b'', universal_newlines=False) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_leaking_fds_on_error(self): # see bug #5179: Popen leaks file descriptors to PIPEs if # the child fails to execute; this will eventually exhaust @@ -1288,6 +1290,10 @@ class ProcessTestCase(BaseTestCase): stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # TODO: RUSTPYTHON + if sys.platform != "win32": + test_leaking_fds_on_error = unittest.expectedFailure(test_leaking_fds_on_error) + def test_nonexisting_with_pipes(self): # bpo-30121: Popen with pipes must close properly pipes on error. # Previously, os.close() was called with a Windows handle which is not @@ -3547,8 +3553,6 @@ class ContextManagerTests(BaseTestCase): proc.communicate(b"context") self.assertEqual(proc.returncode, 1) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_invalid_args(self): with self.assertRaises(NONEXISTING_ERRORS): with subprocess.Popen(NONEXISTING_CMD, @@ -3556,6 +3560,10 @@ class ContextManagerTests(BaseTestCase): stderr=subprocess.PIPE) as proc: pass + # TODO: RUSTPYTHON + if sys.platform != "win32": + test_invalid_args = unittest.expectedFailure(test_invalid_args) + def test_broken_pipe_cleanup(self): """Broken pipe error should not prevent wait() (Issue 21619)""" proc = subprocess.Popen(ZERO_RETURN_CMD,