def test_gc_load_game_modes_nolist(self): mode_list = \ GameMode( mode="test1", priority=5, ) g = GameController() with self.assertRaises(TypeError): g.load_modes(input_modes=mode_list)
def test_gc_load_game_modes(self): mode_list = [ GameMode( mode="test1", priority=5, ), GameMode( mode="test2", priority=6, ) ] g = GameController() g.load_modes(input_modes=mode_list) modes = g.game_mode_names self.assertTrue("test1" in modes) self.assertTrue("test2" in modes)
def test_gc_load_game_modes_badlist(self): mode_list = ["normal", "hard"] g = GameController() with self.assertRaises(TypeError): g.load_modes(input_modes=mode_list)