(self)
| 2580 | # See GH-75586 |
| 2581 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2582 | def test_win_path_needs_curdir(self): |
| 2583 | with unittest.mock.patch('_winapi.NeedCurrentDirectoryForExePath', return_value=True) as need_curdir_mock: |
| 2584 | self.assertTrue(shutil._win_path_needs_curdir('dontcare', os.X_OK)) |
| 2585 | need_curdir_mock.assert_called_once_with('dontcare') |
| 2586 | need_curdir_mock.reset_mock() |
| 2587 | self.assertTrue(shutil._win_path_needs_curdir('dontcare', 0)) |
| 2588 | need_curdir_mock.assert_not_called() |
| 2589 | |
| 2590 | with unittest.mock.patch('_winapi.NeedCurrentDirectoryForExePath', return_value=False) as need_curdir_mock: |
| 2591 | self.assertFalse(shutil._win_path_needs_curdir('dontcare', os.X_OK)) |
| 2592 | need_curdir_mock.assert_called_once_with('dontcare') |
| 2593 | |
| 2594 | @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows') |
| 2595 | def test_same_dir_with_pathext_extension(self): |
nothing calls this directly
no test coverage detected