MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_absolute_posix

Method test_absolute_posix

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

Source from the content-addressed store, hash-verified

3159
3160 @needs_posix
3161 def test_absolute_posix(self):
3162 P = self.cls
3163 self.assertEqual(str(P('/').absolute()), '/')
3164 self.assertEqual(str(P('/a').absolute()), '/a')
3165 self.assertEqual(str(P('/a/b').absolute()), '/a/b')
3166
3167 # '//'-prefixed absolute path (supported by POSIX).
3168 self.assertEqual(str(P('//').absolute()), '//')
3169 self.assertEqual(str(P('//a').absolute()), '//a')
3170 self.assertEqual(str(P('//a/b').absolute()), '//a/b')
3171
3172 @unittest.skipIf(
3173 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