MCPcopy Index your code
hub / github.com/python/cpython / test_venv_posix_without_home_key

Method test_venv_posix_without_home_key

Lib/test/test_getpath.py:357–376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

355 self.assertEqual(expected, actual)
356
357 def test_venv_posix_without_home_key(self):
358 ns = MockPosixNamespace(
359 argv0="/venv/bin/python3",
360 PREFIX="/usr",
361 ENV_PATH="/usr/bin",
362 )
363 # Setup the bare minimum venv
364 ns.add_known_xfile("/usr/bin/python3")
365 ns.add_known_xfile("/venv/bin/python3")
366 ns.add_known_link("/venv/bin/python3", "/usr/bin/python3")
367 ns.add_known_file("/venv/pyvenv.cfg", [
368 # home = key intentionally omitted
369 ])
370 expected = dict(
371 executable="/venv/bin/python3",
372 prefix="/venv",
373 base_prefix="/usr",
374 )
375 actual = getpath(ns, expected)
376 self.assertEqual(expected, actual)
377
378 def test_venv_changed_name_posix(self):
379 "Test a venv layout on *nix."

Callers

nothing calls this directly

Calls 6

add_known_xfileMethod · 0.95
add_known_linkMethod · 0.95
add_known_fileMethod · 0.95
MockPosixNamespaceClass · 0.85
getpathFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected