def test_fatal_error(self): @self.app.route('/') def test(): raise KeyboardInterrupt() self.assertRaises(KeyboardInterrupt, self.assertStatus, 500)