def test_lifetime(self): print "hello" self.assertTrue(True) g = Game() self.assertTrue(g.is_game_alive()) g.kill_game() self.assertFalse(g.is_game_alive())
def test_parsing(self): g = Game() self.assertTrue(g.is_game_alive()) out = g.read_game_status() self.assertNotEquals(len(out), 0) print out out = "" g.send_input("open door") out = g.read_game_status() self.assertNotEquals(len(out), 0) print out out = "" g.send_input("go north") out = g.read_game_status() self.assertNotEquals(len(out), 0) print out out = "" g.send_input("go north") out = g.read_game_status() self.assertNotEquals(len(out), 0) print out out = "" g.send_input("open window") out = g.read_game_status() self.assertNotEquals(len(out), 0) print out out = "" g.kill_game() self.assertFalse(True)