(self)
| 2576 | |
| 2577 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2578 | def test_pathext_extension_ends_with_dot(self): |
| 2579 | ext = '.xyz' |
| 2580 | cmd = self.to_text_type(TESTFN2) |
| 2581 | cmdext = cmd + self.to_text_type(ext) |
| 2582 | dot = self.to_text_type('.') |
| 2583 | filepath = os.path.join(self.dir, cmdext) |
| 2584 | self.create_file(filepath) |
| 2585 | with os_helper.EnvironmentVarGuard() as env: |
| 2586 | env['PATHEXT'] = ext + '.' |
| 2587 | self.assertEqual(shutil.which(cmd, path=self.dir), filepath) # cmd.exe hangs here |
| 2588 | self.assertEqual(shutil.which(cmdext, path=self.dir), filepath) |
| 2589 | self.assertIsNone(shutil.which(cmd + dot, path=self.dir)) |
| 2590 | self.assertIsNone(shutil.which(cmdext + dot, path=self.dir)) |
| 2591 | |
| 2592 | # See GH-75586 |
| 2593 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
nothing calls this directly
no test coverage detected