async def test():
    qh = QuestionHandler()
    # await qh.answer_question("Which of these shows just announced three new cast members?",
    #                          ["Saturday Night Live", "M*A*S*H", "Supernatural"])
    await qh.answer_question(
        "In the 19th century, where were spats typically worn?",
        ["Ears", "Arms", "Feet"])
    await qh.close()
async def test():
    qh = QuestionHandler()
    # fails because all pages say foot/footwear instead of feet
    # await qh.answer_question('In the 19th century, where were spats typically worn?',
    #                          ['Ears', 'Arms', 'Feet'])

    # await qh.answer_question('Which of these games is played on a court?',
    #                          ['Basketball', 'Super Mario Kart', 'Uno'])

    # for is removed as a stopword
    await qh.answer_question("What do NEITHER of the N's in CNN stand for?",
                             ['News', 'Netflix', 'Network'])
    await qh.close()
Пример #3
0
 async def setUpAsync(self):
     self.qh = QuestionHandler()
Пример #4
0
 async def __aenter__(self):
     self.question_handler = QuestionHandler()
     return self