diff options
author | Angus Gratton <angus@redyak.com.au> | 2024-08-01 16:26:46 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-08-02 10:27:53 +1000 |
commit | 9ba04cc7563ec934ca14d66aa18ae3563c8d1aea (patch) | |
tree | a24ce19aa7e8a0739e2b8ec1fcb9d8a780d372f5 /tests/extmod/machine_timer.py | |
parent | d1685a3f5f81f20e9eea26f1274bf6171b287814 (diff) |
tests/extmod: Skip soft machine.Timer test on esp32 port.
Also rename the test to reflect that it's a soft timer test.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'tests/extmod/machine_timer.py')
-rw-r--r-- | tests/extmod/machine_timer.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/extmod/machine_timer.py b/tests/extmod/machine_timer.py deleted file mode 100644 index 1be01d184..000000000 --- a/tests/extmod/machine_timer.py +++ /dev/null @@ -1,38 +0,0 @@ -# test machine.Timer - -try: - import time, machine as machine - - machine.Timer -except: - print("SKIP") - raise SystemExit - -# create and deinit -t = machine.Timer(freq=1) -t.deinit() - -# deinit again -t.deinit() - -# create 2 and deinit -t = machine.Timer(freq=1) -t2 = machine.Timer(freq=1) -t.deinit() -t2.deinit() - -# create 2 and deinit in different order -t = machine.Timer(freq=1) -t2 = machine.Timer(freq=1) -t2.deinit() -t.deinit() - -# create one-shot timer with callback and wait for it to print (should be just once) -t = machine.Timer(period=1, mode=machine.Timer.ONE_SHOT, callback=lambda t: print("one-shot")) -time.sleep_ms(5) -t.deinit() - -# create periodic timer with callback and wait for it to print -t = machine.Timer(period=4, mode=machine.Timer.PERIODIC, callback=lambda t: print("periodic")) -time.sleep_ms(14) -t.deinit() |