<commit_before>import unittest

from cobe.commands import LearnIrcLogCommand

class testIrcLogParsing(unittest.TestCase):
    def setUp(self):
        self.command = LearnIrcLogCommand()

    def testNonPubmsg(self):
        msg = "this is some non-pubmsg text found in a log"
        cmd = self.command

        self.assertEqual(None, cmd._parse_irc_message(msg))

    def testNormalPubmsg(self):
        msg = "12:00 <foo> bar baz"
        cmd = self.command

        self.assertEqual("bar baz", cmd._parse_irc_message(msg))

    def testKibotQuotePubmsg(self):
        msg = "12:00 <foo> \"bar baz\" --user, 01-oct-09"
        cmd = self.command

        self.assertEqual("bar baz", cmd._parse_irc_message(msg))

if __name__ == '__main__':
    unittest.main()<commit_msg>Add a unit test for ignored nicks in _parse_irc_message<commit_after>import unittest

from cobe.commands import LearnIrcLogCommand

class testIrcLogParsing(unittest.TestCase):
    def setUp(self):
        self.command = LearnIrcLogCommand()

    def testNonPubmsg(self):
        msg = "this is some non-pubmsg text found in a log"
        cmd = self.command

        self.assertEqual(None, cmd._parse_irc_message(msg))

    def testNormalPubmsg(self):
        msg = "12:00 <foo> bar baz"
        cmd = self.command

        self.assertEqual("bar baz", cmd._parse_irc_message(msg))

    def testKibotQuotePubmsg(self):
        msg = "12:00 <foo> \"bar baz\" --user, 01-oct-09"
        cmd = self.command

        self.assertEqual("bar baz", cmd._parse_irc_message(msg))

    def testIgnoredNickPubmsg(self):
        msg = "12:00 <foo> bar baz"
        cmd = self.command

        self.assertEqual(None, cmd._parse_irc_message(msg, ["foo"]))

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.11300397501419648, 'fraction_numerical': 0.01590005678591709, 'mean_word_length': 2.9684684684684686, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2095069', 'n_tokens_mistral': 608, 'n_tokens_neox': 566, 'n_words': 135}