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

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Test full match with multidot extension
  • Loading branch information
serhiy-storchaka committed Nov 22, 2024
commit b72facb957638e610ce341a33fd7f2478ed0706d
4 changes: 4 additions & 0 deletions Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2520,6 +2520,10 @@ def test_pathext_with_multidot_extension(self):
with os_helper.EnvironmentVarGuard() as env:
env['PATHEXT'] = ext
self.assertEqual(shutil.which(file, path=self.dir), filepath)
self.assertEqual(shutil.which(file, path=self.dir, mode=os.F_OK), filepath)
file2 = file + self.to_text_type(ext)
self.assertEqual(shutil.which(file2, path=self.dir), filepath)
self.assertEqual(shutil.which(file2, path=self.dir, mode=os.F_OK), filepath)

@unittest.skipUnless(sys.platform == "win32", 'test specific to Windows')
def test_pathext_with_null_extension(self):
Expand Down