Fix failing unit test

This commit is contained in:
Thomas Farstrike
2025-11-15 16:31:28 +01:00
parent 168f1ec374
commit 5fe1652c27
2 changed files with 5 additions and 6 deletions
+4 -4
View File
@@ -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)
+1 -2
View File
@@ -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")