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

Class P

Lib/test/test_pathlib/test_pathlib.py:1285–1291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1283
1284 def test_with_segments(self):
1285 class P(self.cls):
1286 def __init__(self, *pathsegments, session_id):
1287 super().__init__(*pathsegments)
1288 self.session_id = session_id
1289
1290 def with_segments(self, *pathsegments):
1291 return type(self)(*pathsegments, session_id=self.session_id)
1292 p = P(self.base, session_id=42)
1293 self.assertEqual(42, p.absolute().session_id)
1294 self.assertEqual(42, p.resolve().session_id)

Callers 15

test_joinMethod · 0.70
test_divMethod · 0.70
test_joinMethod · 0.70
test_divMethod · 0.70
test_partsMethod · 0.70
test_parentMethod · 0.70
test_parentsMethod · 0.70
test_anchorMethod · 0.70
test_nameMethod · 0.70
test_stemMethod · 0.70
test_suffixMethod · 0.70
test_suffixesMethod · 0.70

Calls

no outgoing calls

Tested by 15

test_joinMethod · 0.56
test_divMethod · 0.56
test_joinMethod · 0.56
test_divMethod · 0.56
test_partsMethod · 0.56
test_parentMethod · 0.56
test_parentsMethod · 0.56
test_anchorMethod · 0.56
test_nameMethod · 0.56
test_stemMethod · 0.56
test_suffixMethod · 0.56
test_suffixesMethod · 0.56