Exemplo n.º 1
0
def test_update_file_access_time_success(tmp_path: Path) -> None:
    file_path = tmp_path / "my_file"
    file_path.touch()

    old_access_time = file_path.stat().st_atime
    time.sleep(0.01)
    update_file_access_time(file_path)
    new_access_time = file_path.stat().st_atime

    assert new_access_time > old_access_time
Exemplo n.º 2
0
def test_update_file_access_time_no_file(tmp_path: Path) -> None:
    update_file_access_time(tmp_path / "my_file")