ML-184: add Presto smoke test harness
Add a headless smoke-test harness for the Presto microPython app using pimoroni-emulator mock modules. A PRESTO_TEST_MODE=1 guard prevents main() from running at import time so draw functions can be called directly from tests. - presto/main.py: wrap main() with PRESTO_TEST_MODE guard - presto/tests/: conftest with emulator fixtures, 7 smoke tests - presto/mise.toml: add [tasks.test] - presto/README.md, presto/AGENTS.md: add Testing section - .gitignore: exclude test __pycache__, pytest_cache, fixture pngs
This commit is contained in:
+3
-1
@@ -29,6 +29,7 @@ Setup:
|
||||
# ============================================================================
|
||||
|
||||
import gc
|
||||
import os
|
||||
import time
|
||||
import network
|
||||
import ntptime
|
||||
@@ -2713,4 +2714,5 @@ def main():
|
||||
# STARTUP
|
||||
# ============================================================================
|
||||
|
||||
main()
|
||||
if os.environ.get("PRESTO_TEST_MODE") != "1":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user