Improve main.py sandbox-mode test coverage
#1839
+73
−19
Merged