Test handling of failed symlinks on Windows.
(self)
| 595 | @unittest.skipUnless(os.name == 'nt' and can_symlink(), |
| 596 | 'symlinks on Windows') |
| 597 | def test_failed_symlink(self): |
| 598 | """ |
| 599 | Test handling of failed symlinks on Windows. |
| 600 | """ |
| 601 | rmtree(self.env_dir) |
| 602 | env_dir = os.path.join(os.path.realpath(self.env_dir), 'venv') |
| 603 | with patch('os.symlink') as mock_symlink: |
| 604 | mock_symlink.side_effect = OSError() |
| 605 | builder = venv.EnvBuilder(clear=True, symlinks=True) |
| 606 | _, err = self.run_with_capture(builder.create, env_dir) |
| 607 | filepath_regex = r"'[A-Z]:\\\\(?:[^\\\\]+\\\\)*[^\\\\]+'" |
| 608 | self.assertRegex(err, rf"Unable to symlink {filepath_regex} to {filepath_regex}") |
| 609 | |
| 610 | @requireVenvCreate |
| 611 | def test_multiprocessing(self): |
nothing calls this directly
no test coverage detected