Test symlinking works as expected
(self)
| 451 | |
| 452 | @unittest.skipUnless(can_symlink(), 'Needs symlinks') |
| 453 | def test_symlinking(self): |
| 454 | """ |
| 455 | Test symlinking works as expected |
| 456 | """ |
| 457 | for usl in (False, True): |
| 458 | builder = venv.EnvBuilder(clear=True, symlinks=usl) |
| 459 | builder.create(self.env_dir) |
| 460 | fn = self.get_env_file(self.bindir, self.exe) |
| 461 | # Don't test when False, because e.g. 'python' is always |
| 462 | # symlinked to 'python3.3' in the env, even when symlinking in |
| 463 | # general isn't wanted. |
| 464 | if usl: |
| 465 | if self.cannot_link_exe: |
| 466 | # Symlinking is skipped when our executable is already a |
| 467 | # special app symlink |
| 468 | self.assertFalse(os.path.islink(fn)) |
| 469 | else: |
| 470 | self.assertTrue(os.path.islink(fn)) |
| 471 | |
| 472 | # If a venv is created from a source build and that venv is used to |
| 473 | # run the test, the pyvenv.cfg in the venv created in the test will |
nothing calls this directly
no test coverage detected