mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Move mpos.apps.good_stack_size() to TaskManager.good_stack_size()
Trying to get every app-facing API as part of an object.
This commit is contained in:
@@ -2,12 +2,10 @@ import unittest
|
||||
import _thread
|
||||
import time
|
||||
|
||||
from mpos import App, PackageManager
|
||||
import mpos.apps
|
||||
from mpos import App, PackageManager, TaskManager
|
||||
|
||||
from websocket import WebSocketApp
|
||||
|
||||
|
||||
# demo_multiple_ws.py
|
||||
import asyncio
|
||||
import aiohttp
|
||||
@@ -137,7 +135,7 @@ class TestTwoWebsockets(unittest.TestCase):
|
||||
asyncio.run(self.main())
|
||||
|
||||
def test_it(self):
|
||||
_thread.stack_size(mpos.apps.good_stack_size())
|
||||
_thread.stack_size(TaskManager.good_stack_size())
|
||||
_thread.start_new_thread(self.newthread, ())
|
||||
time.sleep(10)
|
||||
|
||||
@@ -253,6 +251,6 @@ class TestCrashingSeparateThreads(): # Disabled
|
||||
|
||||
def test_it(self):
|
||||
for url in self.WS_URLS:
|
||||
_thread.stack_size(mpos.apps.good_stack_size())
|
||||
_thread.stack_size(TaskManager.good_stack_size())
|
||||
_thread.start_new_thread(self.newthread, (url,))
|
||||
time.sleep(15)
|
||||
|
||||
@@ -3,7 +3,7 @@ import _thread
|
||||
import time
|
||||
|
||||
from mpos import App, PackageManager
|
||||
import mpos.apps
|
||||
from mpos import TaskManager
|
||||
|
||||
from websocket import WebSocketApp
|
||||
|
||||
@@ -136,7 +136,7 @@ class TestTwoWebsockets(unittest.TestCase):
|
||||
asyncio.run(self.main())
|
||||
|
||||
def test_it(self):
|
||||
_thread.stack_size(mpos.apps.good_stack_size())
|
||||
_thread.stack_size(TaskManager.good_stack_size())
|
||||
_thread.start_new_thread(self.newthread, ())
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user