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

Class P

Lib/test/test_pathlib/test_join.py:37–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36 def test_with_segments(self):
37 class P(self.cls):
38 def __init__(self, *pathsegments, session_id):
39 super().__init__(*pathsegments)
40 self.session_id = session_id
41
42 def with_segments(self, *pathsegments):
43 return type(self)(*pathsegments, session_id=self.session_id)
44 p = P('foo', 'bar', session_id=42)
45 self.assertEqual(42, (p / 'foo').session_id)
46 self.assertEqual(42, ('foo' / p).session_id)

Callers 15

test_constructorMethod · 0.70
test_with_segmentsMethod · 0.70
test_joinMethod · 0.70
test_divMethod · 0.70
test_full_matchMethod · 0.70
test_partsMethod · 0.70
test_parentMethod · 0.70
test_parentsMethod · 0.70
test_anchorMethod · 0.70
test_nameMethod · 0.70
test_suffixMethod · 0.70

Calls

no outgoing calls

Tested by 15

test_constructorMethod · 0.56
test_with_segmentsMethod · 0.56
test_joinMethod · 0.56
test_divMethod · 0.56
test_full_matchMethod · 0.56
test_partsMethod · 0.56
test_parentMethod · 0.56
test_parentsMethod · 0.56
test_anchorMethod · 0.56
test_nameMethod · 0.56
test_suffixMethod · 0.56