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

Method test_hardlink

testing/_py/test_local.py:1297–1303  ·  testing/_py/test_local.py::TestPOSIXLocalPath.test_hardlink
(self, tmpdir)

Source from the content-addressed store, hash-verified

1295 pytestmark = skiponwin32
1296
1297 def test_hardlink(self, tmpdir):
1298 linkpath = tmpdir.join(class="st">"test")
1299 filepath = tmpdir.join(class="st">"file")
1300 filepath.write_text(class="st">"Hello", encoding=class="st">"utf-8")
1301 nlink = filepath.stat().nlink
1302 linkpath.mklinkto(filepath)
1303 assert filepath.stat().nlink == nlink + 1
1304
1305 def test_symlink_are_identical(self, tmpdir):
1306 filepath = tmpdir.join(class="st">"file")

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
write_textMethod · 0.80
statMethod · 0.80
mklinktoMethod · 0.80

Tested by

no test coverage detected