(self)
| 2520 | |
| 2521 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2522 | def test_pathext(self): |
| 2523 | ext = '.xyz' |
| 2524 | cmd = self.to_text_type(TESTFN2) |
| 2525 | cmdext = cmd + self.to_text_type(ext) |
| 2526 | filepath = os.path.join(self.dir, cmdext) |
| 2527 | self.create_file(filepath) |
| 2528 | with os_helper.EnvironmentVarGuard() as env: |
| 2529 | env['PATHEXT'] = ext |
| 2530 | self.assertEqual(shutil.which(cmd, path=self.dir), filepath) |
| 2531 | self.assertEqual(shutil.which(cmdext, path=self.dir), filepath) |
| 2532 | |
| 2533 | # Issue 40592: See https://bugs.python.org/issue40592 |
| 2534 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
nothing calls this directly
no test coverage detected