test: raise failure to download emulators only in upgrade tests
What changed, and why it matters
This commit only changes a test helper file. It adds a clearer error message when test emulators haven't been downloaded yet. It does not touch the actual Trezor firmware, wallet code, or any user-facing security behavior.
No security action needed; this is a benign test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds an early check in tests/upgrade_tests/init.py’s for_all() decorator that raises ValueError if ALL_TAGS is empty, telling the developer to run download_emulators.sh. This is purely a developer-experience improvement for the test suite and has no runtime effect on device firmware.
Changed components
tests/upgrade_tests/__init__.pyInspect captured patch +4 / −0
diff --git a/tests/upgrade_tests/__init__.py b/tests/upgrade_tests/__init__.py
index d39a016ba..fc8946265 100644
--- a/tests/upgrade_tests/__init__.py
+++ b/tests/upgrade_tests/__init__.py
@@ -78,6 +78,10 @@ def for_all(
The test function should have arguments `gen` ("core" or "legacy") and `tag`
(version tag usable in EmulatorWrapper call)
"""
+ if not ALL_TAGS:
+ raise ValueError(
+ "No files found. Use download_emulators.sh to download emulators."
+ )
models = []
gens = set()
for item in args:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.