diff options
-rw-r--r-- | tests/ports/unix/mod_os.py | 3 | ||||
-rw-r--r-- | tests/ports/unix/time_mktime_localtime.py | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/ports/unix/mod_os.py b/tests/ports/unix/mod_os.py index f69fa45b2..468f6badd 100644 --- a/tests/ports/unix/mod_os.py +++ b/tests/ports/unix/mod_os.py @@ -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") diff --git a/tests/ports/unix/time_mktime_localtime.py b/tests/ports/unix/time_mktime_localtime.py index d1c03c103..df5d6cda6 100644 --- a/tests/ports/unix/time_mktime_localtime.py +++ b/tests/ports/unix/time_mktime_localtime.py @@ -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] |