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

Method test_symlink_normal_win32

Lib/test/test_getpath.py:160–185  ·  view source on GitHub ↗

Test a 'standard' install layout via symlink on Windows.

(self)

Source from the content-addressed store, hash-verified

158 self.assertEqual(expected, actual)
159
160 def test_symlink_normal_win32(self):
161 "Test a 'standard' install layout via symlink on Windows."
162 ns = MockNTNamespace(
163 argv0=r"C:\LinkedFrom\python.exe",
164 real_executable=r"C:\Python\python.exe",
165 )
166 ns.add_known_xfile(r"C:\LinkedFrom\python.exe")
167 ns.add_known_xfile(r"C:\Python\python.exe")
168 ns.add_known_link(r"C:\LinkedFrom\python.exe", r"C:\Python\python.exe")
169 ns.add_known_file(r"C:\Python\Lib\os.py")
170 ns.add_known_dir(r"C:\Python\DLLs")
171 expected = dict(
172 executable=r"C:\LinkedFrom\python.exe",
173 base_executable=r"C:\LinkedFrom\python.exe",
174 prefix=r"C:\Python",
175 exec_prefix=r"C:\Python",
176 module_search_paths_set=1,
177 module_search_paths=[
178 r"C:\Python\python98.zip",
179 r"C:\Python\DLLs",
180 r"C:\Python\Lib",
181 r"C:\Python",
182 ],
183 )
184 actual = getpath(ns, expected)
185 self.assertEqual(expected, actual)
186
187 def test_symlink_buildtree_win32(self):
188 "Test an in-build-tree layout via symlink on Windows."

Callers

nothing calls this directly

Calls 7

add_known_xfileMethod · 0.95
add_known_linkMethod · 0.95
add_known_fileMethod · 0.95
add_known_dirMethod · 0.95
MockNTNamespaceClass · 0.85
getpathFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected