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

Method test_realpath_pardir

Lib/test/test_ntpath.py:510–520  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

508 expected)
509
510 def test_realpath_pardir(self):
511 expected = ntpath.normpath(os.getcwd())
512 tester("ntpath.realpath('..')", ntpath.dirname(expected))
513 tester("ntpath.realpath('../..')",
514 ntpath.dirname(ntpath.dirname(expected)))
515 tester("ntpath.realpath('/'.join(['..'] * 50))",
516 ntpath.splitdrive(expected)[0] + '\\')
517 tester("ntpath.realpath('..\\..')",
518 ntpath.dirname(ntpath.dirname(expected)))
519 tester("ntpath.realpath('\\'.join(['..'] * 50))",
520 ntpath.splitdrive(expected)[0] + '\\')
521
522 def test_realpath_pardir_strict(self):
523 expected = ntpath.normpath(os.getcwd())

Callers

nothing calls this directly

Calls 2

testerFunction · 0.85
dirnameMethod · 0.45

Tested by

no test coverage detected