MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_executable_symlinks

Method test_executable_symlinks

Lib/test/test_venv.py:487–497  ·  view source on GitHub ↗

Test that the sys.executable value is as expected.

(self)

Source from the content-addressed store, hash-verified

485
486 @unittest.skipUnless(can_symlink(), 'Needs symlinks')
487 def test_executable_symlinks(self):
488 """
489 Test that the sys.executable value is as expected.
490 """
491 rmtree(self.env_dir)
492 builder = venv.EnvBuilder(clear=True, symlinks=True)
493 builder.create(self.env_dir)
494 envpy = self.envpy(real_env_dir=True)
495 out, err = check_output([envpy, '-c',
496 'import sys; print(sys.executable)'])
497 self.assertEqual(out.strip(), envpy.encode())
498
499 # gh-124651: test quoted strings
500 @unittest.skipIf(os.name == 'nt', 'contains invalid characters on Windows')

Callers

nothing calls this directly

Calls 7

rmtreeFunction · 0.90
envpyMethod · 0.80
check_outputFunction · 0.70
createMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected