MCPcopy
hub / github.com/pytest-dev/pytest / test_symlink_relative

Method test_symlink_relative

testing/_py/test_local.py:1321–1329  ·  view source on GitHub ↗
(self, tmpdir)

Source from the content-addressed store, hash-verified

1319 assert linkpath.islink()
1320
1321 def test_symlink_relative(self, tmpdir):
1322 linkpath = tmpdir.join("test")
1323 filepath = tmpdir.join("file")
1324 filepath.write_text("Hello", encoding="utf-8")
1325 linkpath.mksymlinkto(filepath, absolute=False)
1326 assert linkpath.readlink() == "file"
1327 assert filepath.read_text(encoding="utf-8") == linkpath.read_text(
1328 encoding="utf-8"
1329 )
1330
1331 def test_symlink_not_existing(self, tmpdir):
1332 linkpath = tmpdir.join("testnotexisting")

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
write_textMethod · 0.80
mksymlinktoMethod · 0.80
readlinkMethod · 0.80
read_textMethod · 0.80

Tested by

no test coverage detected