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

Method test_realpath_relative

Lib/test/test_ntpath.py:653–660  ·  view source on GitHub ↗
(self, kwargs)

Source from the content-addressed store, hash-verified

651 @unittest.skipUnless(HAVE_GETFINALPATHNAME, 'need _getfinalpathname')
652 @_parameterize({}, {'strict': True}, {'strict': ALL_BUT_LAST}, {'strict': ALLOW_MISSING})
653 def test_realpath_relative(self, kwargs):
654 ABSTFN = ntpath.abspath(os_helper.TESTFN)
655 open(ABSTFN, "wb").close()
656 self.addCleanup(os_helper.unlink, ABSTFN)
657 self.addCleanup(os_helper.unlink, ABSTFN + "1")
658
659 os.symlink(ABSTFN, ntpath.relpath(ABSTFN + "1"))
660 self.assertPathEqual(ntpath.realpath(ABSTFN + "1", **kwargs), ABSTFN)
661
662 @os_helper.skip_unless_symlink
663 @unittest.skipUnless(HAVE_GETFINALPATHNAME, 'need _getfinalpathname')

Callers

nothing calls this directly

Calls 6

addCleanupMethod · 0.80
openFunction · 0.50
abspathMethod · 0.45
closeMethod · 0.45
assertPathEqualMethod · 0.45
realpathMethod · 0.45

Tested by

no test coverage detected