Skip to content

Commit c3e0a1c

Browse files
Simplify and fix tests
1 parent 09c5249 commit c3e0a1c

13 files changed

+8
-30
lines changed

scripts/run_desktop.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ pushd internal_filesystem/
6161
elif [ ! -z "$script" ]; then # it's an app name
6262
scriptdir="$script"
6363
echo "Running app from $scriptdir"
64-
"$binary" -X heapsize=$HEAPSIZE -v -i -c "import sys ; sys.path.append('lib/') ; import mpos.main ; import mpos.apps; mpos.apps.start_app('$scriptdir')"
64+
"$binary" -X heapsize=$HEAPSIZE -v -i -c "$(cat boot.py) ; import mpos.apps; mpos.apps.start_app('$scriptdir')"
6565
else
66-
"$binary" -X heapsize=$HEAPSIZE -v -i -c "import sys ; sys.path.append('lib/') ; import mpos.main"
66+
"$binary" -X heapsize=$HEAPSIZE -v -i -c "$(cat boot.py)"
6767
fi
6868

6969

tests/test_connectivity_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,5 +634,3 @@ def test_multiple_apps_using_connectivity_manager(self):
634634
self.assertFalse(app3_state[0])
635635

636636

637-
if __name__ == '__main__':
638-
unittest.main()

tests/test_graphical_abc_button_debug.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,3 @@ def test_simulate_abc_button_click(self):
103103
print("="*70)
104104

105105

106-
if __name__ == "__main__":
107-
unittest.main()

tests/test_graphical_keyboard_crash_reproduction.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,3 @@ def test_multiple_keyboards(self):
145145
print("SUCCESS: Multiple keyboards work")
146146

147147

148-
if __name__ == "__main__":
149-
unittest.main()

tests/test_graphical_keyboard_default_vs_custom.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,3 @@ def _get_special_labels(self, keyboard):
185185
return labels
186186

187187

188-
if __name__ == "__main__":
189-
unittest.main()

tests/test_graphical_keyboard_layout_switching.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,5 +284,3 @@ def test_event_handler_switches_layout(self):
284284
print("\nSUCCESS: Event handler preserves custom layout!")
285285

286286

287-
if __name__ == "__main__":
288-
unittest.main()

tests/test_graphical_keyboard_mode_switch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,3 @@ def test_event_handler_exists(self):
153153
print("Note: The handler filters for VALUE_CHANGED events only")
154154

155155

156-
if __name__ == "__main__":
157-
unittest.main()

tests/test_graphical_keyboard_q_button_bug.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,3 @@ def test_keyboard_button_discovery(self):
225225
self.assertTrue(len(found_buttons) > 0,
226226
"Should find at least some buttons on keyboard")
227227

228-
229-
if __name__ == "__main__":
230-
unittest.main()

tests/test_graphical_keyboard_rapid_mode_switch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,3 @@ def test_button_indices_after_mode_switch(self):
150150
except:
151151
pass
152152

153-
if __name__ == "__main__":
154-
unittest.main()

tests/test_graphical_launch_all_apps.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,3 @@ def test_about_app_loads(self):
246246
f"About app should load without errors: {error_msg}")
247247

248248

249-
if __name__ == '__main__':
250-
unittest.main()

0 commit comments

Comments
 (0)