MCPcopy
hub / github.com/pytest-dev/pytest / is_fs_root

Function is_fs_root

src/_pytest/config/findpaths.py:345–350  ·  view source on GitHub ↗

r""" Return True if the given path is pointing to the root of the file system ("/" on Unix and "C:\\" on Windows for example).

(p: Path)

Source from the content-addressed store, hash-verified

343
344
345def is_fs_root(p: Path) -> bool:
346 r"""
347 Return True if the given path is pointing to the root of the
348 file system ("/" on Unix and "C:\\" on Windows for example).
349 """
350 return os.path.splitdrive(str(p))[1] == os.sep

Callers 2

test_is_fs_rootFunction · 0.90
determine_setupFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_is_fs_rootFunction · 0.72