(self, tmpdir)
| 1487 | assert (dst.mtime() - src.mtime()) < ATIME_RESOLUTION |
| 1488 | |
| 1489 | def test_copy_stat_dir(self, tmpdir): |
| 1490 | test_files = ["a", "b", "c"] |
| 1491 | src = tmpdir.join("src") |
| 1492 | for f in test_files: |
| 1493 | src.join(f).write_text(f, ensure=True, encoding="utf-8") |
| 1494 | dst = tmpdir.join("dst") |
| 1495 | # a small delay before the copy |
| 1496 | time.sleep(ATIME_RESOLUTION) |
| 1497 | src.copy(dst, stat=True) |
| 1498 | for f in test_files: |
| 1499 | oldstat = src.join(f).stat() |
| 1500 | newstat = dst.join(f).stat() |
| 1501 | assert (newstat.atime - oldstat.atime) < ATIME_RESOLUTION |
| 1502 | assert (newstat.mtime - oldstat.mtime) < ATIME_RESOLUTION |
| 1503 | assert oldstat.mode == newstat.mode |
| 1504 | |
| 1505 | def test_chown_identity(self, path1): |
| 1506 | owner = path1.stat().owner |
nothing calls this directly
no test coverage detected