[presto] fix boot mode

This commit is contained in:
Claudio Ortolina
2026-05-15 11:53:37 +01:00
parent 354214b6f0
commit cb1e032fc2
2 changed files with 2 additions and 8 deletions
+1 -6
View File
@@ -6,7 +6,6 @@ display is set up as a session-scoped fixture; ``main`` is imported once
after the mocks are in place.
"""
import os
import sys
from pathlib import Path
@@ -17,10 +16,6 @@ _presto_dir = Path(__file__).resolve().parent.parent
if str(_presto_dir) not in sys.path:
sys.path.insert(0, str(_presto_dir))
# Prevent main() from running when we import the module.
os.environ["PRESTO_TEST_MODE"] = "1"
# ---------------------------------------------------------------------------
# Emulator session setup
# ---------------------------------------------------------------------------
@@ -62,7 +57,7 @@ def _emulator():
def main_module(_emulator):
"""Import ``main.py`` after the emulator mocks are installed.
The ``PRESTO_TEST_MODE=1`` guard ensures ``main()`` does not run.
The ``__name__ == "__main__"`` guard ensures ``main()`` does not run.
``fetch_thumbnail`` is monkey-patched to raise on any network call.
"""
import main