(self)
| 2592 | # See GH-75586 |
| 2593 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2594 | def test_pathext_applied_on_files_in_path(self): |
| 2595 | ext = '.xyz' |
| 2596 | cmd = self.to_text_type(TESTFN2) |
| 2597 | cmdext = cmd + self.to_text_type(ext) |
| 2598 | filepath = os.path.join(self.dir, cmdext) |
| 2599 | self.create_file(filepath) |
| 2600 | with os_helper.EnvironmentVarGuard() as env: |
| 2601 | env["PATH"] = os.fsdecode(self.dir) |
| 2602 | env["PATHEXT"] = ext |
| 2603 | self.assertEqual(shutil.which(cmd), filepath) |
| 2604 | self.assertEqual(shutil.which(cmdext), filepath) |
| 2605 | |
| 2606 | # See GH-75586 |
| 2607 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
nothing calls this directly
no test coverage detected