Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e92dfbf

Browse files
committed
Issue #17046: Fix test_subprocess test_executable_without_cwd broken test case.
1 parent 6ddd265 commit e92dfbf

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_subprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ def test_executable_with_cwd(self):
382382
def test_executable_without_cwd(self):
383383
# For a normal installation, it should work without 'cwd'
384384
# argument. For test runs in the build directory, see #7774.
385-
self._assert_cwd('', "somethingyoudonthave", executable=sys.executable)
385+
self._assert_cwd(os.getcwd(), "somethingyoudonthave",
386+
executable=sys.executable)
386387

387388
def test_stdin_pipe(self):
388389
# stdin redirection

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ IDLE
230230
Tests
231231
-----
232232

233+
- Issue #17046: Fix broken test_executable_without_cwd in test_subprocess.
234+
233235
- Issue #15415: Add new temp_dir() and change_cwd() context managers to
234236
test.support, and refactor temp_cwd() to use them. Patch by Chris Jerdonek.
235237

0 commit comments

Comments
 (0)