I found the problem. I need to not start the MainLoop on the app. My working code is now this.
class ValidInputTest4(unittest.TestCase):
def setUp(self):
self.app = wx.App()
self.frame = FoodCalories(None)
def tearDown(self):
self.frame.Destroy()
This cleanly exits the program and allows me to do unit tests in between.