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

Method test_realpath_pardir

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

Source from the content-addressed store, hash-verified

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