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

Method _test_home

Lib/test/test_pathlib/test_pathlib.py:1246–1251  ·  view source on GitHub ↗
(self, p)

Source from the content-addressed store, hash-verified

1244 self.assertEqual(str(P('..', 'b').absolute()), os.path.join(self.base, '..', 'b'))
1245
1246 def _test_home(self, p):
1247 q = self.cls(os.path.expanduser('~'))
1248 self.assertEqual(p, q)
1249 self.assertEqualNormCase(str(p), str(q))
1250 self.assertIs(type(p), type(q))
1251 self.assertTrue(p.is_absolute())
1252
1253 @unittest.skipIf(
1254 pwd is None, reason="Test requires pwd module to get homedir."

Callers 1

test_homeMethod · 0.95

Calls 8

assertEqualNormCaseMethod · 0.95
strFunction · 0.85
expanduserMethod · 0.80
assertTrueMethod · 0.80
is_absoluteMethod · 0.80
clsMethod · 0.45
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected