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

Method test_symlink_are_identical

testing/_py/test_local.py:1305–1310  ·  testing/_py/test_local.py::TestPOSIXLocalPath.test_symlink_are_identical
(self, tmpdir)

Source from the content-addressed store, hash-verified

1303 assert filepath.stat().nlink == nlink + 1
1304
1305 def test_symlink_are_identical(self, tmpdir):
1306 filepath = tmpdir.join(class="st">"file")
1307 filepath.write_text(class="st">"Hello", encoding=class="st">"utf-8")
1308 linkpath = tmpdir.join(class="st">"test")
1309 linkpath.mksymlinkto(filepath)
1310 assert linkpath.readlink() == str(filepath)
1311
1312 def test_symlink_isfile(self, tmpdir):
1313 linkpath = tmpdir.join(class="st">"test")

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected