summaryrefslogtreecommitdiffstatshomepage
path: root/tests/thread/thread_stacksize1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread/thread_stacksize1.py')
-rw-r--r--tests/thread/thread_stacksize1.py5
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))