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

Method _gethomedir

src/_pytest/_py/path.py:1240–1248  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

1238
1239 @classmethod
1240 def _gethomedir(cls):
1241 try:
1242 x = os.environ["HOME"]
1243 except KeyError:
1244 try:
1245 x = os.environ["HOMEDRIVE"] + os.environ["HOMEPATH"]
1246 except KeyError:
1247 return None
1248 return cls(x)
1249
1250 # """
1251 # special class constructors for local filesystem paths

Callers 2

test_homedir_from_HOMEFunction · 0.80
test_homedir_not_existsFunction · 0.80

Calls 1

clsFunction · 0.85

Tested by 2

test_homedir_from_HOMEFunction · 0.64
test_homedir_not_existsFunction · 0.64