Skip to content

Commit 5fe1652

Browse files
Fix failing unit test
1 parent 168f1ec commit 5fe1652

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tests/test_start_app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ def __init__(self):
1818
TFT_VER_RES=240
1919

2020
bus = lcd_bus.SDLBus(flags=0)
21-
buf1 = bus.allocate_framebuffer(320 * 240 * 2, 0)
22-
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)
23-
display.init()
21+
buf1 = bus.allocate_framebuffer(TFT_HOR_RES * TFT_VER_RES * 2, 0)
22+
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)
23+
mpos.ui.main_display.init()
2424
init_rootscreen()
2525
mpos.ui.topmenu.create_notification_bar()
26-
mpos.ui.topmenu.create_drawer(display)
26+
mpos.ui.topmenu.create_drawer(mpos.ui.main_display)
2727
mpos.ui.task_handler = task_handler.TaskHandler(duration=5) # 5ms is recommended for MicroPython+LVGL on desktop (less results in lower framerate)
2828

2929

tests/unittest.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,9 @@ if [ -z "$onetest" ]; then
106106
one_test "$file"
107107
result=$?
108108
if [ $result -ne 0 ]; then
109-
echo "test $file got error $result"
109+
echo "\n\n\nWARNING: test $file got error $result !!!\n\n\n"
110110
failed=$(expr $failed \+ 1)
111111
fi
112-
113112
done < <( find "$testdir" -iname "test_*.py" )
114113
else
115114
one_test $(readlink -f "$onetest")

0 commit comments

Comments
 (0)