<commit_before>import sys


class Plugin:
    def on_command(self, bot, msg):
        print(*sys.argv[1:])

    def on_help(self):
        return "Usage: echo <string>"<commit_msg>Add tests for echo plugin<commit_after>import io
import unittest


class Plugin:
    def on_command(self, bot, msg, stdin, stdout, reply):
        print(*msg["args"][1:], file=stdout)

    def on_help(self):
        return "Usage: echo <string>"


class Test(unittest.TestCase):
    def setUp(self):
        self.plugin = Plugin()

    def test_words(self):
        for i in range(1, 100):
            stdout = io.StringIO()
            words = [None] + ["word"] * i
            self.plugin.on_command(None, {"args": words}, None, stdout, None)
            self.assertEqual(stdout.getvalue().strip(), " ".join(words[1:]))

    def test_help(self):
        self.assertTrue(self.plugin.on_help())
{'fraction_non_alphanumeric': 0.14645308924485126, 'fraction_numerical': 0.008009153318077803, 'mean_word_length': 2.8043478260869565, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, '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': '5726148', 'n_tokens_mistral': 289, 'n_tokens_neox': 275, 'n_words': 69}