コード例 #1
0
ファイル: test_wolfram_alpha.py プロジェクト: EArmour/pyfibot
def test_simple():
    module_wolfram_alpha.init(bot)
    query = "42"
    # Wolfram Alpha seems to randomly return also Roman numerals
    regex = u"(42 = forty-two|forty-two = XLII)"
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)[1]
    check_re(regex, result)
コード例 #2
0
def test_simple():
    module_wolfram_alpha.init(bot)
    query = "42"
    # Wolfram Alpha seems to randomly return also Roman numerals
    regex = u"(42 = forty-two|forty-two = XLII)"
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)[1]
    check_re(regex, result)
コード例 #3
0
def test_complex(botmock):
    query = "answer to the life universe and everything"
    target = (
        "#channel",
        u"Answer to the Ultimate Question of Life, the Universe, and Everything = 42 | (according to the book The Hitchhiker's Guide to the Galaxy, by Douglas Adams)",
    )
    result = module_wolfram_alpha.command_wa(botmock, None, "#channel", query)
    eq_(target, result)
コード例 #4
0
def test_complex():
    query = "answer to the life universe and everything"
    target = (
        "#channel",
        u"Answer to the Ultimate Question of Life, the Universe, and Everything = 42 | (according to Douglas Adams' humorous science-fiction novel The Hitchhiker's Guide to the Galaxy)"
    )
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)
    eq_(target, result)
コード例 #5
0
ファイル: test_wolfram_alpha.py プロジェクト: EArmour/pyfibot
def test_complex():
    query = "answer to the life universe and everything"
    target = ("#channel", u"Answer to the Ultimate Question of Life, the Universe, and Everything = 42 | (according to Douglas Adams' humorous science-fiction novel The Hitchhiker's Guide to the Galaxy)")
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)
    eq_(target, result)
コード例 #6
0
def test_simple():
    module_wolfram_alpha.init(bot)
    query = "42"
    target = ("#channel", u"42 = forty-two")
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)
    eq_(target, result)
コード例 #7
0
ファイル: test_wolfram_alpha.py プロジェクト: HaleBob/pyfibot
def test_simple():
    module_wolfram_alpha.init(bot)
    query = "42"
    target = ("#channel", u"42 = forty-two")
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)
    eq_(target, result)