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

Method test_symlink_isfile

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

Source from the content-addressed store, hash-verified

1310 assert linkpath.readlink() == str(filepath)
1311
1312 def test_symlink_isfile(self, tmpdir):
1313 linkpath = tmpdir.join("test")
1314 filepath = tmpdir.join("file")
1315 filepath.write_text("", encoding="utf-8")
1316 linkpath.mksymlinkto(filepath)
1317 assert linkpath.check(file=1)
1318 assert not linkpath.check(link=0, file=1)
1319 assert linkpath.islink()
1320
1321 def test_symlink_relative(self, tmpdir):
1322 linkpath = tmpdir.join("test")

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
write_textMethod · 0.80
mksymlinktoMethod · 0.80
checkMethod · 0.45
islinkMethod · 0.45

Tested by

no test coverage detected