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

Method test_div

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

Source from the content-addressed store, hash-verified

66 self.assertEqual(pp, P(f'{sep}c'))
67
68 def test_div(self):
69 # Basically the same as joinpath().
70 P = self.cls
71 sep = self.cls.parser.sep
72 p = P(f'a{sep}b')
73 pp = p / 'c'
74 self.assertEqual(pp, P(f'a{sep}b{sep}c'))
75 self.assertIs(type(pp), type(p))
76 pp = p / f'c{sep}d'
77 self.assertEqual(pp, P(f'a{sep}b{sep}c{sep}d'))
78 pp = p / 'c' / 'd'
79 self.assertEqual(pp, P(f'a{sep}b{sep}c{sep}d'))
80 pp = 'c' / p / 'd'
81 self.assertEqual(pp, P(f'c{sep}a{sep}b{sep}d'))
82 pp = p/ f'{sep}c'
83 self.assertEqual(pp, P(f'{sep}c'))
84
85 def test_full_match(self):
86 P = self.cls

Callers

nothing calls this directly

Calls 3

PClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected