<commit_before># -*- coding: utf-8 -*-
from nose.tools import eq_
import bot_mock
from pyfibot.modules import module_wolfram_alpha
from utils import check_re

config = {"module_wolfram_alpha":
          {"appid": "3EYA3R-WVR6GJQWLH"}}  # unit-test only APPID, do not abuse kthxbai

bot = bot_mock.BotMock(config=config)


def test_simple():
    module_wolfram_alpha.init(bot)
    query = "42"
    # Wolfram Alpha seems to randomly return also Roman numerals
    regex = u"42 = forty-two( = XLII)?"
    result = module_wolfram_alpha.command_wa(bot, None, "#channel", query)[1]
    check_re(regex, result)
<commit_msg>No. Logic. Fixed test. Entering lottery.<commit_after># -*- coding: utf-8 -*-
from nose.tools import eq_
import bot_mock
from pyfibot.modules import module_wolfram_alpha
from utils import check_re

config = {"module_wolfram_alpha":
          {"appid": "3EYA3R-WVR6GJQWLH"}}  # unit-test only APPID, do not abuse kthxbai

bot = bot_mock.BotMock(config=config)


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)

{'fraction_non_alphanumeric': 0.11435331230283911, 'fraction_numerical': 0.014195583596214511, 'mean_word_length': 4.137651821862348, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7192474', 'n_tokens_mistral': 469, 'n_tokens_neox': 454, 'n_words': 115}