mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
tests/ports/unix: Improve skip detection for os.getenv and time module.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# This module is not entirely compatible with CPython
|
||||
import os
|
||||
|
||||
if not hasattr(os, "getenv"):
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
os.putenv("TEST_VARIABLE", "TEST_VALUE")
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
try:
|
||||
import time
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
DAYS_PER_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user