This commit is contained in:
Thomas Farstrike
2026-02-10 23:49:28 +01:00
parent f567e06a39
commit 0632246f50
4 changed files with 4 additions and 22 deletions
@@ -1,5 +1,5 @@
import sys
import logging.logging as logging
import logging
from mpos import Activity, DisplayMetrics, BuildInfo, DeviceInfo
@@ -0,0 +1 @@
from .logging import *
+1 -17
View File
@@ -3,27 +3,14 @@
import unittest
import sys
import io
import logging.logging as logging
import logging
# Add lib to path so we can import logging
sys.path.insert(0, 'MicroPythonOS/internal_filesystem/lib')
class TestLoggingLevels(unittest.TestCase):
"""Test that logger levels work correctly with handlers."""
def setUp(self):
"""Set up test fixtures."""
# Clear any existing loggers
logging._loggers.clear()
# Reset basicConfig
logging.basicConfig(force=True)
def tearDown(self):
"""Clean up after tests."""
logging.shutdown()
logging._loggers.clear()
def test_child_logger_info_level_with_root_handlers(self):
"""Test that a child logger can set INFO level and log INFO messages using root handlers."""
# Capture output
@@ -146,6 +133,3 @@ class TestLoggingLevels(unittest.TestCase):
self.assertTrue("info message" not in output)
self.assertTrue("warning message" in output)
if __name__ == '__main__':
unittest.main()
+1 -4
View File
@@ -7,17 +7,14 @@ from mpos import TaskManager
from websocket import WebSocketApp
# demo_multiple_ws.py
import asyncio
import aiohttp
from aiohttp import WSMsgType
import logging.logging as logging
import logging
import sys
from typing import List
# ----------------------------------------------------------------------
# Logging
# ----------------------------------------------------------------------