tests/run-tests: Auto-skip extmod/ticks_diff, extmod/time_ms_us tests.

This commit is contained in:
Yonatan Goldschmidt 2020-01-17 03:37:32 +02:00 committed by Damien George
parent 88cbfd791a
commit 0852acfc74
3 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,8 @@
from utime import ticks_diff, ticks_add
try:
from utime import ticks_diff, ticks_add
except ImportError:
print("SKIP")
raise SystemExit
MAX = ticks_add(0, -1)
# Should be done like this to avoid small int overflow

View File

@ -1,7 +1,7 @@
import utime
try:
utime.sleep_ms
except AttributeError:
import utime
utime.sleep_ms, utime.sleep_us, utime.ticks_diff, utime.ticks_ms, utime.ticks_us, utime.ticks_cpu
except (ImportError, AttributeError):
print("SKIP")
raise SystemExit

View File

@ -384,8 +384,6 @@ def run_tests(pyb, tests, args, base_path="."):
skip_tests.add('micropython/opt_level.py') # don't assume line numbers are stored
elif args.target == 'nrf':
skip_tests.add('basics/memoryview1.py') # no item assignment for memoryview
skip_tests.add('extmod/ticks_diff.py') # unimplemented: utime.ticks_diff
skip_tests.add('extmod/time_ms_us.py') # unimplemented: utime.ticks_ms
skip_tests.add('extmod/urandom_basic.py') # unimplemented: urandom.seed
skip_tests.add('micropython/opt_level.py') # no support for line numbers
skip_tests.add('misc/non_compliant.py') # no item assignment for bytearray