MCPcopy Create free account
hub / github.com/pytest-dev/pytest / get_dir_from_path

Function get_dir_from_path

src/_pytest/config/findpaths.py:144–147  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

142 return x.split("::")[0]
143
144 def get_dir_from_path(path: Path) -> Path:
145 if path.is_dir():
146 return path
147 return path.parent
148
149 def safe_exists(path: Path) -> bool:
150 # This can throw on paths that contain characters unrepresentable at the OS level,

Callers 1

get_dirs_from_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected