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

Method test_parts

Lib/test/test_pathlib/test_join.py:151–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

149 self.assertFalse(P('foo').full_match('.'))
150
151 def test_parts(self):
152 # `parts` returns a tuple.
153 sep = self.cls.parser.sep
154 P = self.cls
155 p = P(f'a{sep}b')
156 parts = p.parts
157 self.assertEqual(parts, ('a', 'b'))
158 # When the path is absolute, the anchor is a separate part.
159 p = P(f'{sep}a{sep}b')
160 parts = p.parts
161 self.assertEqual(parts, (sep, 'a', 'b'))
162
163 @threading_helper.requires_working_threading()
164 def test_parts_multithreaded(self):

Callers

nothing calls this directly

Calls 2

PClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected