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

Method test_home

Lib/test/test_pathlib/test_pathlib.py:1256–1266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1254 pwd is None, reason="Test requires pwd module to get homedir."
1255 )
1256 def test_home(self):
1257 with os_helper.EnvironmentVarGuard() as env:
1258 self._test_home(self.cls.home())
1259
1260 env.clear()
1261 env['USERPROFILE'] = os.path.join(self.base, 'userprofile')
1262 self._test_home(self.cls.home())
1263
1264 # bpo-38883: ignore `HOME` when set on windows
1265 env['HOME'] = os.path.join(self.base, 'home')
1266 self._test_home(self.cls.home())
1267
1268 @unittest.skipIf(is_wasi, "WASI has no user accounts.")
1269 def test_expanduser_common(self):

Callers

nothing calls this directly

Calls 4

_test_homeMethod · 0.95
homeMethod · 0.45
clearMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected