(self)
| 2606 | # See GH-75586 |
| 2607 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2608 | def test_win_path_needs_curdir(self): |
| 2609 | with unittest.mock.patch('_winapi.NeedCurrentDirectoryForExePath', return_value=True) as need_curdir_mock: |
| 2610 | self.assertTrue(shutil._win_path_needs_curdir('dontcare', os.X_OK)) |
| 2611 | need_curdir_mock.assert_called_once_with('dontcare') |
| 2612 | need_curdir_mock.reset_mock() |
| 2613 | self.assertTrue(shutil._win_path_needs_curdir('dontcare', 0)) |
| 2614 | need_curdir_mock.assert_not_called() |
| 2615 | |
| 2616 | with unittest.mock.patch('_winapi.NeedCurrentDirectoryForExePath', return_value=False) as need_curdir_mock: |
| 2617 | self.assertFalse(shutil._win_path_needs_curdir('dontcare', os.X_OK)) |
| 2618 | need_curdir_mock.assert_called_once_with('dontcare') |
| 2619 | |
| 2620 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2621 | def test_same_dir_with_pathext_extension(self): |
nothing calls this directly
no test coverage detected