diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 3bbb19c573f..470faff3c72 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -416,7 +416,8 @@ def test_executable_with_cwd(self): def test_executable_without_cwd(self): # For a normal installation, it should work without 'cwd' # argument. For test runs in the build directory, see #7774. - self._assert_cwd('', "somethingyoudonthave", executable=sys.executable) + self._assert_cwd(os.getcwd(), "somethingyoudonthave", + executable=sys.executable) def test_stdin_pipe(self): # stdin redirection diff --git a/Misc/NEWS b/Misc/NEWS index 027f5a72d82..868fb9ee693 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -599,6 +599,8 @@ Library Tests ----- +- Issue #17046: Fix broken test_executable_without_cwd in test_subprocess. + - Issue #15415: Add new temp_dir() and change_cwd() context managers to test.support, and refactor temp_cwd() to use them. Patch by Chris Jerdonek.