def test_menu_run_out_of_range(self) -> None: menu = Menu(items=[{"label": "a", "callback": a}]) with self.assertRaises(TypeError): self.assertEqual(menu.run(choose_msg="test"), None)
def test_menu_run(self) -> None: menu = Menu(items=[{"label": "a", "callback": a}]) self.assertEqual(menu.run(choose_msg="test"), None)