def test_complete_one(self): player = Player("fritz", "m") driver = TestDriver() conn = PlayerConnection(player) io = IoAdapterBase(conn) conn.io = io self.assertEqual(["criticize"], io.tab_complete("critic", driver))
def test_complete_c(self): player = Player("fritz", "m") driver = TestDriver() conn = PlayerConnection(player) io = IoAdapterBase(conn) conn.io = io result = io.tab_complete("c", driver) self.assertGreater(len(result), 20) self.assertTrue("cackle" in result) self.assertTrue("criticize" in result) result = io.tab_complete("h", driver) self.assertGreater(len(result), 10) self.assertTrue("hiss" in result)