Skip to content

Commit d2348c7

Browse files
committed
feat: add test for MicroPython ESP32 example execution
1 parent 3d45901 commit d2348c7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_micropython_esp32.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-FileCopyrightText: 2025-present CodeMagic LTD
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
from .utils import run_example_module
6+
7+
8+
def test_micropython_esp32_example() -> None:
9+
"""MicroPython ESP32 example should run and print MicroPython banner."""
10+
# MicroPython boot can take a bit longer; give it a few seconds
11+
result = run_example_module("examples.micropython_esp32.main", sleep_time="3")
12+
assert result.returncode == 0
13+
# Expect a line from the injected MicroPython script
14+
assert "Hello, MicroPython! I'm running on a Wokwi ESP32 simulator." in result.stdout

0 commit comments

Comments
 (0)