(self)
| 2619 | |
| 2620 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2621 | def test_same_dir_with_pathext_extension(self): |
| 2622 | cmd = self.file # with .exe extension |
| 2623 | # full match |
| 2624 | self.assertNormEqual(shutil.which(cmd, path=self.dir), self.filepath) |
| 2625 | self.assertNormEqual(shutil.which(cmd, path=self.dir, mode=os.F_OK), |
| 2626 | self.filepath) |
| 2627 | |
| 2628 | cmd2 = cmd + self.to_text_type('.com') # with .exe.com extension |
| 2629 | other_file_path = os.path.join(self.dir, cmd2) |
| 2630 | self.create_file(other_file_path) |
| 2631 | |
| 2632 | # full match |
| 2633 | self.assertNormEqual(shutil.which(cmd, path=self.dir), self.filepath) |
| 2634 | self.assertNormEqual(shutil.which(cmd, path=self.dir, mode=os.F_OK), |
| 2635 | self.filepath) |
| 2636 | self.assertNormEqual(shutil.which(cmd2, path=self.dir), other_file_path) |
| 2637 | self.assertNormEqual(shutil.which(cmd2, path=self.dir, mode=os.F_OK), |
| 2638 | other_file_path) |
| 2639 | |
| 2640 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2641 | def test_same_dir_without_pathext_extension(self): |
nothing calls this directly
no test coverage detected