summaryrefslogtreecommitdiff
path: root/tests/extmod/machine_timer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/machine_timer.py')
-rw-r--r--tests/extmod/machine_timer.py38
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()