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:
parent
9b5e20dc20
commit
9a37e2feb9
@ -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 @@
|
||||
import time
|
||||
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]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user