tests/thread: Make stack-size test run correctly and reliable on uPy.

uheapq-ticks
Damien George 2016-05-31 11:54:09 +01:00
parent 94238d4ae5
commit 5b7789d519
1 changed files with 4 additions and 1 deletions

View File

@ -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))