<commit_before>import sys
import unittest
sys.path.append('../src/')
from rgrep import *


class TestRGrep(unittest.TestCase):
    def test_grep_without_arguments(self):
        self.assertEquals(RGrep.display_usage(), 'Usage: python rgrep '
                          '[options] pattern files\nThe options '
                          'are the same as grep\n')

    def test_grep_pattern_text(self):
        rgrep = RGrep('hello', 'hello')
        self.assertEquals(rgrep.get_match(), True)

    def test_grep_pattern_in_text(self):
        rgrep = RGrep('hello', 'hello world')
        self.assertEquals(rgrep.get_match(), True)

    def test_case_insensitive(self):
        rgrep = RGrep('hello', 'HELLO')
        self.assertEquals(rgrep.get_match_case_insensitive(), True)

    def test_count(self):
        rgrep = RGrep('hello', 'hello\nhello\nhello')
        self.assertEquals(rgrep.get_count(), 3)

    def test_version_information(self):
        self.assertEquals(RGrep.get_version(), 'RGrep (BSD) 0.0.1')

    def test_inverted_match(self):
        rgrep = RGrep('hello', 'hello\nworld\nhello')
        self.assertEquals(rgrep.get_match_inverted().next(), 'world')

    def test_quiet_mode(self):
        rgrep = RGrep('hello', 'hello\nhello\nhello')
        self.assertEquals(rgrep.get_quiet_match(), True)

    def test_max_count(self):
        rgrep = RGrep('hello', 'hello\nworld\nhello')
        self.assertEquals(rgrep.get_match_maxcount(1), 1)

    def test_line_numbers(self):
        rgrep = RGrep('hello', 'hello\nworld\nhello')
        self.assertEquals(rgrep.get_line_numbers(), [1, 3])


if __name__ == '__main__':
    unittest.main()<commit_msg>Add a couple more tests<commit_after>import sys
import unittest
sys.path.append('../src/')
from rgrep import *


class TestRGrep(unittest.TestCase):
    def test_grep_without_arguments(self):
        self.assertEquals(RGrep.display_usage(), 'Usage: python rgrep '
                          '[options] pattern files\nThe options '
                          'are the same as grep\n')

    def test_grep_pattern_text(self):
        rgrep = RGrep('hello', 'hello')
        self.assertEquals(rgrep.get_match(), True)

    def test_grep_pattern_in_text(self):
        rgrep = RGrep('hello', 'hello world')
        self.assertEquals(rgrep.get_match(), True)

    def test_case_insensitive(self):
        rgrep = RGrep('hello', 'HELLO')
        self.assertEquals(rgrep.get_match_case_insensitive(), True)

    def test_count(self):
        rgrep = RGrep('hello', 'hello\nhello\nhello')
        self.assertEquals(rgrep.get_count(), 3)

    def test_version_information(self):
        self.assertEquals(RGrep.get_version(), 'RGrep (BSD) 0.0.1')

    def test_inverted_match(self):
        rgrep = RGrep('hello', 'hello\nworld\nhello')
        self.assertEquals(rgrep.get_match_inverted().next(), 'world')

    def test_quiet_mode(self):
        rgrep = RGrep('hello', 'hello\nhello\nhello')
        self.assertEquals(rgrep.get_quiet_match(), True)

    def test_quiet_mode_neg(self):
        rgrep = RGrep('hello', 'this will not match')
        self.assertEquals(rgrep.get_quiet_match(), False)

    def test_max_count(self):
        rgrep = RGrep('hello', 'hello\nworld\nhello')
        self.assertEquals(rgrep.get_match_maxcount(1), 1)

    def test_line_numbers(self):
        rgrep = RGrep('hello', 'hello\nworld\nhello')
        self.assertEquals(rgrep.get_line_numbers(), [1, 3])

    def test_single_line_number(self):
        rgrep = RGrep('hello', 'hello')
        self.assertEquals(rgrep.get_line_numbers(), [1])


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.1344723064205015, 'fraction_numerical': 0.00468448608432075, 'mean_word_length': 3.1724137931034484, 'pattern_counts': {'":': 0, '<': 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': '6300233', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1162, 'n_words': 206}