MCPcopy
hub / github.com/marimo-team/marimo / test_hardlink_to

Method test_hardlink_to

tests/_utils/test_async_path.py:418–432  ·  view source on GitHub ↗

Test hardlink_to creates hard link.

(self)

Source from the content-addressed store, hash-verified

416
417class TestAsyncPathEdgeCases:
418 async def test_hardlink_to(self):
419 """Test hardlink_to creates hard link."""
420 with tempfile.TemporaryDirectory() as tmp:
421 source = AsyncPath(tmp) / "source.txt"
422 target = AsyncPath(tmp) / "target.txt"
423 await source.write_text("test content")
424
425 await target.hardlink_to(source)
426
427 assert await target.exists()
428 assert await target.read_text() == "test content"
429 # Both should have same inode (hard link)
430 source_stat = await source.stat()
431 target_stat = await target.stat()
432 assert source_stat.st_ino == target_stat.st_ino
433
434 async def test_write_text_with_newline(self):
435 """Test write_text with custom newline parameter."""

Callers

nothing calls this directly

Calls 6

AsyncPathClass · 0.90
hardlink_toMethod · 0.80
statMethod · 0.80
write_textMethod · 0.45
existsMethod · 0.45
read_textMethod · 0.45

Tested by

no test coverage detected