diff --git a/tests/test_read_file_image.py b/tests/test_read_file_image.py index 39b2cb03..c2dd8af0 100644 --- a/tests/test_read_file_image.py +++ b/tests/test_read_file_image.py @@ -9,6 +9,7 @@ import asyncio import base64 import json +import os import threading import time from pathlib import Path @@ -1615,14 +1616,13 @@ def test_an_attachment_that_cannot_be_prepared_is_named_not_dropped(tmp_path: Pa assert "could not be prepared" in out +@pytest.mark.skipif(os.geteuid() == 0, reason="chmod 000 does not block root") def test_an_attachment_that_cannot_be_read_costs_a_note_not_the_turn(tmp_path: Path) -> None: """Resolution only proved the path pointed at a file. Permissions can change between then and the read, and the file can be gone -- and this renderer runs deep inside turn assembly, where an ``OSError`` reaches the caller as a failed turn rather than as a message about one attachment. """ - import os - from raven.context_engine.segments import render locked = _write_image(tmp_path / "locked.png", (60, 40))