diff options
author | Damien George <damien.p.george@gmail.com> | 2016-05-31 11:54:09 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-06-28 11:28:52 +0100 |
commit | 5b7789d519be7251c58b68879f013d5f3bf0c950 (patch) | |
tree | d6349cbc13ba15599f76ab93520b3a6deee0e34e /tests/thread | |
parent | 94238d4ae5851802db75aa49d4b68bca6f99d6a8 (diff) | |
download | micropython-5b7789d519be7251c58b68879f013d5f3bf0c950.tar.gz micropython-5b7789d519be7251c58b68879f013d5f3bf0c950.zip |
tests/thread: Make stack-size test run correctly and reliable on uPy.
Diffstat (limited to 'tests/thread')
-rw-r--r-- | tests/thread/thread_stacksize1.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/thread/thread_stacksize1.py b/tests/thread/thread_stacksize1.py index e3e77fadaf..e62899631f 100644 --- a/tests/thread/thread_stacksize1.py +++ b/tests/thread/thread_stacksize1.py @@ -6,7 +6,7 @@ import sys import _thread # different implementations have different minimum sizes -if sys.implementation == 'micropython': +if sys.implementation.name == 'micropython': sz = 2 * 1024 else: sz = 32 * 1024 @@ -20,6 +20,9 @@ def thread_entry(): global n_finished n_finished += 1 +# reset stack size to default +_thread.stack_size() + # test set/get of stack size print(_thread.stack_size()) print(_thread.stack_size(sz)) |