From 5fe1652c27d0e9c2049ef069f8f4d208ca9e043b Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 15 Nov 2025 16:31:28 +0100 Subject: [PATCH] Fix failing unit test --- tests/test_start_app.py | 8 ++++---- tests/unittest.sh | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_start_app.py b/tests/test_start_app.py index 2a876d0a..ce6c060a 100644 --- a/tests/test_start_app.py +++ b/tests/test_start_app.py @@ -18,12 +18,12 @@ class TestStartApp(unittest.TestCase): TFT_VER_RES=240 bus = lcd_bus.SDLBus(flags=0) - buf1 = bus.allocate_framebuffer(320 * 240 * 2, 0) - display = sdl_display.SDLDisplay(data_bus=bus,display_width=TFT_HOR_RES,display_height=TFT_VER_RES,frame_buffer1=buf1,color_space=lv.COLOR_FORMAT.RGB565) - display.init() + buf1 = bus.allocate_framebuffer(TFT_HOR_RES * TFT_VER_RES * 2, 0) + mpos.ui.main_display = sdl_display.SDLDisplay(data_bus=bus,display_width=TFT_HOR_RES,display_height=TFT_VER_RES,frame_buffer1=buf1,color_space=lv.COLOR_FORMAT.RGB565) + mpos.ui.main_display.init() init_rootscreen() mpos.ui.topmenu.create_notification_bar() - mpos.ui.topmenu.create_drawer(display) + mpos.ui.topmenu.create_drawer(mpos.ui.main_display) mpos.ui.task_handler = task_handler.TaskHandler(duration=5) # 5ms is recommended for MicroPython+LVGL on desktop (less results in lower framerate) diff --git a/tests/unittest.sh b/tests/unittest.sh index 87ba53c8..90f6ef7e 100755 --- a/tests/unittest.sh +++ b/tests/unittest.sh @@ -106,10 +106,9 @@ if [ -z "$onetest" ]; then one_test "$file" result=$? if [ $result -ne 0 ]; then - echo "test $file got error $result" + echo "\n\n\nWARNING: test $file got error $result !!!\n\n\n" failed=$(expr $failed \+ 1) fi - done < <( find "$testdir" -iname "test_*.py" ) else one_test $(readlink -f "$onetest")