summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/uasyncio_basic.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-05-03 22:39:58 +1000
committerDamien George <damien@micropython.org>2022-05-03 22:53:12 +1000
commitc90f097519c7342a128848bf9dc5b38ba75d4222 (patch)
treedf9c67263d9fa2cd3c7d97f893147825a2a22e1c /tests/extmod/uasyncio_basic.py
parent0e7bfc88c6ac6b5d64240f91183a3cfe2ab67ade (diff)
downloadmicropython-c90f097519c7342a128848bf9dc5b38ba75d4222.tar.gz
micropython-c90f097519c7342a128848bf9dc5b38ba75d4222.zip
tests/extmod: Increase timing on uasyncio tests to make more reliable.
Non-real-time systems like Windows, Linux and macOS do not have reliable timing, so increase the sleep intervals to make these tests more likely to pass. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/extmod/uasyncio_basic.py')
-rw-r--r--tests/extmod/uasyncio_basic.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/extmod/uasyncio_basic.py b/tests/extmod/uasyncio_basic.py
index c88908d99b..20c0a82e47 100644
--- a/tests/extmod/uasyncio_basic.py
+++ b/tests/extmod/uasyncio_basic.py
@@ -32,18 +32,18 @@ async def main():
print("after sleep")
t0 = ticks()
- await delay_print(0.02, "short")
+ await delay_print(0.2, "short")
t1 = ticks()
- await delay_print(0.04, "long")
+ await delay_print(0.4, "long")
t2 = ticks()
await delay_print(-1, "negative")
t3 = ticks()
print(
"took {} {} {}".format(
- round(ticks_diff(t1, t0), -1),
- round(ticks_diff(t2, t1), -1),
- round(ticks_diff(t3, t2), -1),
+ round(ticks_diff(t1, t0), -2),
+ round(ticks_diff(t2, t1), -2),
+ round(ticks_diff(t3, t2), -2),
)
)