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

pull/2165/head
Damien George 2016-05-31 11:54:09 +01:00
rodzic 94238d4ae5
commit 5b7789d519
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

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