Skip to content

Commit 5b7789d

Browse files
committed
tests/thread: Make stack-size test run correctly and reliable on uPy.
1 parent 94238d4 commit 5b7789d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/thread/thread_stacksize1.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import _thread
77

88
# different implementations have different minimum sizes
9-
if sys.implementation == 'micropython':
9+
if sys.implementation.name == 'micropython':
1010
sz = 2 * 1024
1111
else:
1212
sz = 32 * 1024
@@ -20,6 +20,9 @@ def thread_entry():
2020
global n_finished
2121
n_finished += 1
2222

23+
# reset stack size to default
24+
_thread.stack_size()
25+
2326
# test set/get of stack size
2427
print(_thread.stack_size())
2528
print(_thread.stack_size(sz))

0 commit comments

Comments
 (0)