<commit_before>import unittest

def euclid(m, n):
    r = m % n
    if r == 0:
        return n
    else:
        return euclid(n, r)

class TestEuclid(unittest.TestCase):

    correct = [
        {
            'm': 119,
            'n': 544,
            'answer': 17,
        },
    ]
    incorrect = [
        {
            'm': 119,
            'n': 544,
            'answer': 1,
        },
    ]

    def test_correct(self):
        for test in self.correct:
            self.assertEqual(euclid(test['m'], test['n']), test['answer'])

    def test_incorrect(self):
        for test in self.incorrect:
            self.assertNotEqual(euclid(test['m'], test['n']), test['answer'])

if __name__ == '__main__':
    unittest.main()<commit_msg>started trying to programmatically generate test methods and ended up reading about metaclasses.  I think using a metaclass and generating the test methods from a dictionary of test cases would be a better way to write the tests, but it's too far off topic for now.  wrote the tests simply and going to leave refactoring for later.<commit_after>import unittest

def euclid(m, n):
    r = m % n
    if r == 0:
        return n
    else:
        return euclid(n, r)

class TestEuclid(unittest.TestCase):
    def test_0(self):
        self.assertEqual(euclid(6, 8), 2)

    def test_1(self):
        self.assertEqual(euclid(55, 121), 11)

    def test_2(self):
        self.assertEqual(euclid(119, 544), 17)

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.11713520749665328, 'fraction_numerical': 0.025435073627844713, 'mean_word_length': 2.24295010845987, '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': '4021679', 'n_tokens_mistral': 520, 'n_tokens_neox': 476, 'n_words': 148}