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

Method add_known_dir

Lib/test/test_getpath.py:969–973  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

967 self._links[path.casefold()] = target
968
969 def add_known_dir(self, path):
970 p = path.rstrip("\\").casefold()
971 while p:
972 self._dirs.add(p)
973 p = p.rpartition("\\")[0]
974
975 def __missing__(self, key):
976 try:

Callers 5

test_normal_win32Method · 0.95
test_venv_win32Method · 0.95
test_registry_win32Method · 0.95
add_known_fileMethod · 0.95

Calls 4

casefoldMethod · 0.80
rstripMethod · 0.45
addMethod · 0.45
rpartitionMethod · 0.45

Tested by

no test coverage detected