Skip to content

Commit ae04ee0

Browse files
committed
tests: Add skip condition for test_ctrl_c_interrupt under MicroPython.
This test must run with CPython as it spawns a subprocess. Skip it when run by the test framework which executes tests with MicroPython. Signed-off-by: Andrew Leech <[email protected]>
1 parent 1dabff8 commit ae04ee0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/ports/unix/test_ctrl_c_interrupt.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
and sends SIGINT to verify it generates KeyboardInterrupt.
77
"""
88

9-
import pty
9+
# This test must be run with CPython as it spawns a subprocess
10+
try:
11+
import pty
12+
except ImportError:
13+
print("SKIP")
14+
raise SystemExit
15+
1016
import os
1117
import subprocess
1218
import select

0 commit comments

Comments
 (0)