Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,9 @@ def test_environ_path_cwd(self):
self.assertIsNone(rv)

# look in current directory
with os_helper.change_cwd(self.dir):
with os_helper.change_cwd(self.dir), \
unittest.mock.patch('shutil._win_path_needs_curdir',
return_value=True):
rv = shutil.which(self.file)
self.assertEqual(rv, expected_cwd)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix ``test_shutil.test_environ_path_cwd`` on Windows, which relied on the
user's ``NoDefaultCurrentDirectoryInExePath`` environment setting and was
therefore non-deterministic.
Loading