<commit_before>import unittest
import des


class test_des(unittest.TestCase):
    def setUp(self):
        self.des = des.des(b'abcdefgh')

    def test_encode(self):
        ret = self.des.encode(255)
        self.assertEqual(ret, b'!\xec\xdb\xc1\xa8Z\xe0\xe2')

    def test_decode(self):
        ret = self.des.decode(b'!\xec\xdb\xc1\xa8Z\xe0\xe2')
        self.assertEqual(ret, 255)

    def test_is_under_8_octets(self):
        self.assertTrue(self.des.__des__is_under_8_octets(42))
        self.assertTrue(self.des.__des__is_under_8_octets(0x1145148108931919))
        self.assertFalse(self.des.__des__is_under_8_octets(0x1234567890abcdef0))

    def test_encode_raieses(self):
        self.assertRaises(Exception, lambda: self.des.encode(0xfedcba9876543210f))

    def test_decode_raieses(self):
        self.assertRaises(Exception, lambda: self.des.decode(b'12345678fedcba098'))

    def test_des_init_raieses(self):
        self.assertRaises(Exception, lambda: des.des(b'0123456789'))
        self.assertRaises(Exception, lambda: des.des(b'98765'))


if __name__ == '__main__':
    unittest.main()<commit_msg>関数の呼び出し方間違えてた<commit_after>import unittest
import des


class test_des(unittest.TestCase):
    def setUp(self):
        self.des = des.des(b'abcdefgh')

    def test_encode(self):
        ret = self.des.encode(255)
        self.assertEqual(ret, b'!\xec\xdb\xc1\xa8Z\xe0\xe2')

    def test_decode(self):
        ret = self.des.decode(b'!\xec\xdb\xc1\xa8Z\xe0\xe2')
        self.assertEqual(ret, 255)

    def test_is_under_8_octets(self):
        self.assertTrue(self.des._des__is_under_8_octets(42))
        self.assertTrue(self.des._des__is_under_8_octets(0x1145148108931919))
        self.assertFalse(self.des._des__is_under_8_octets(0x1234567890abcdef0))

    def test_encode_raieses(self):
        self.assertRaises(Exception, lambda: self.des.encode(0xfedcba9876543210f))

    def test_decode_raieses(self):
        self.assertRaises(Exception, lambda: self.des.decode(b'12345678fedcba098'))

    def test_des_init_raieses(self):
        self.assertRaises(Exception, lambda: des.des(b'0123456789'))
        self.assertRaises(Exception, lambda: des.des(b'98765'))


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.12516763522574878, 'fraction_numerical': 0.07688869021010282, 'mean_word_length': 3.833693304535637, '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': '4073648', 'n_tokens_mistral': 947, 'n_tokens_neox': 842, 'n_words': 97}