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

Method test_buildtree_win32

Lib/test/test_getpath.py:48–72  ·  view source on GitHub ↗

Test an in-build-tree layout on Windows.

(self)

Source from the content-addressed store, hash-verified

46 self.assertEqual(expected, actual)
47
48 def test_buildtree_win32(self):
49 "Test an in-build-tree layout on Windows."
50 ns = MockNTNamespace(
51 argv0=r"C:\CPython\PCbuild\amd64\python.exe",
52 real_executable=r"C:\CPython\PCbuild\amd64\python.exe",
53 )
54 ns.add_known_xfile(r"C:\CPython\PCbuild\amd64\python.exe")
55 ns.add_known_file(r"C:\CPython\Lib\os.py")
56 ns.add_known_file(r"C:\CPython\PCbuild\amd64\pybuilddir.txt", [""])
57 expected = dict(
58 executable=r"C:\CPython\PCbuild\amd64\python.exe",
59 base_executable=r"C:\CPython\PCbuild\amd64\python.exe",
60 prefix=r"C:\CPython",
61 exec_prefix=r"C:\CPython",
62 build_prefix=r"C:\CPython",
63 _is_python_build=1,
64 module_search_paths_set=1,
65 module_search_paths=[
66 r"C:\CPython\PCbuild\amd64\python98.zip",
67 r"C:\CPython\PCbuild\amd64",
68 r"C:\CPython\Lib",
69 ],
70 )
71 actual = getpath(ns, expected)
72 self.assertEqual(expected, actual)
73
74 def test_venv_win32(self):
75 """Test a venv layout on Windows.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected