diff --git a/tests/extmod/ticks_diff.py b/tests/extmod/ticks_diff.py index 4d8df83cf9..de45a557af 100644 --- a/tests/extmod/ticks_diff.py +++ b/tests/extmod/ticks_diff.py @@ -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 diff --git a/tests/extmod/time_ms_us.py b/tests/extmod/time_ms_us.py index 135cf1e096..7c915d067a 100644 --- a/tests/extmod/time_ms_us.py +++ b/tests/extmod/time_ms_us.py @@ -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 diff --git a/tests/run-tests b/tests/run-tests index f0fa834070..253850b6a7 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -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