Test hardlink_to creates hard link.
(self)
| 416 | |
| 417 | class 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.""" |
nothing calls this directly
no test coverage detected