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

Method test_absolute_posix

Lib/test/test_pathlib/test_pathlib.py:3152–3161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3150
3151 @needs_posix
3152 def test_absolute_posix(self):
3153 P = self.cls
3154 self.assertEqual(str(P('/').absolute()), '/')
3155 self.assertEqual(str(P('/a').absolute()), '/a')
3156 self.assertEqual(str(P('/a/b').absolute()), '/a/b')
3157
3158 # '//'-prefixed absolute path (supported by POSIX).
3159 self.assertEqual(str(P('//').absolute()), '//')
3160 self.assertEqual(str(P('//a').absolute()), '//a')
3161 self.assertEqual(str(P('//a/b').absolute()), '//a/b')
3162
3163 @unittest.skipIf(
3164 is_wasm32,

Callers

nothing calls this directly

Calls 4

strFunction · 0.85
absoluteMethod · 0.80
PClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected