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

Method test_realpath_pardir

Lib/test/test_posixpath.py:463–470  ·  view source on GitHub ↗
(self, kwargs)

Source from the content-addressed store, hash-verified

461 @skip_if_ABSTFN_contains_backslash
462 @_parameterize({}, {'strict': True}, {'strict': ALLOW_MISSING})
463 def test_realpath_pardir(self, kwargs):
464 self.assertEqual(realpath('..', **kwargs), dirname(os.getcwd()))
465 self.assertEqual(realpath('../..', **kwargs), dirname(dirname(os.getcwd())))
466 self.assertEqual(realpath('/'.join(['..'] * 100), **kwargs), '/')
467
468 self.assertEqual(realpath(b'..', **kwargs), dirname(os.getcwdb()))
469 self.assertEqual(realpath(b'../..', **kwargs), dirname(dirname(os.getcwdb())))
470 self.assertEqual(realpath(b'/'.join([b'..'] * 100), **kwargs), b'/')
471
472 @os_helper.skip_unless_symlink
473 @skip_if_ABSTFN_contains_backslash

Callers

nothing calls this directly

Calls 4

realpathFunction · 0.90
dirnameFunction · 0.90
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected