<commit_before>import unittest
import itertools

from cualid import create_ids
from cualid.mint import at_least_distance


class TestCreateIDS(unittest.TestCase):
    def test_create_ids(self):
        self.assertEqual(len(list(create_ids(10, 5))), 10)
        self.assertEqual(len(list(create_ids(0, 3))), 0)
        self.assertEqual(len(list(create_ids(1, 6))), 1)

    def test_create_ids_fail(self):
        result = list(create_ids(1000, 3))
        self.assertTrue(len(result) > 0)
        self.assertTrue(len(result) < 1000)

    def test_create_ids_API(self):
        result = list(create_ids(100, 7))
        self.assertTrue(len(str(result[0][0])) == 7)
        #It is length 36 because of the four - dividers
        self.assertTrue(len(str(result[0][1])) == 36)


class TestAtLeastDistance(unittest.TestCase):

    def test_empty(self):
        self.assertTrue(at_least_distance('12345', []))

    def test_single(self):
        self.assertTrue(at_least_distance('12345', ['54321']))

    def test_hypercube(self):
        full = ['0000', '0111']
        all_possible = [''.join(e) for e in itertools.product('01', repeat=4)]

        for s in all_possible:
            self.assertFalse(at_least_distance(s, full))

    def test_long(self):
        collection = ['abcdefghijk', 'a-c^efghijk', 'abcdef@h$jk']

        self.assertTrue(at_least_distance('a_defghi_k', collection))
        self.assertTrue(at_least_distance('abcd___hijk', collection))
<commit_msg>Now at pep8 standards<commit_after>import unittest
import itertools

from cualid import create_ids
from cualid.mint import at_least_distance


class TestCreateIDS(unittest.TestCase):
    def test_create_ids(self):
        self.assertEqual(len(list(create_ids(10, 5))), 10)
        self.assertEqual(len(list(create_ids(0, 3))), 0)
        self.assertEqual(len(list(create_ids(1, 6))), 1)

    def test_create_ids_fail(self):
        result = list(create_ids(1000, 3))
        self.assertTrue(len(result) > 0)
        self.assertTrue(len(result) < 1000)

    def test_create_ids_API(self):
        result = list(create_ids(100, 7))
        self.assertTrue(len(str(result[0][0])) == 7)
        """It is length 36 because of the four - dividers"""
        self.assertTrue(len(str(result[0][1])) == 36)


class TestAtLeastDistance(unittest.TestCase):

    def test_empty(self):
        self.assertTrue(at_least_distance('12345', []))

    def test_single(self):
        self.assertTrue(at_least_distance('12345', ['54321']))

    def test_hypercube(self):
        full = ['0000', '0111']
        all_possible = [''.join(e) for e in itertools.product('01', repeat=4)]

        for s in all_possible:
            self.assertFalse(at_least_distance(s, full))

    def test_long(self):
        collection = ['abcdefghijk', 'a-c^efghijk', 'abcdef@h$jk']

        self.assertTrue(at_least_distance('a_defghi_k', collection))
        self.assertTrue(at_least_distance('abcd___hijk', collection))

{'fraction_non_alphanumeric': 0.1377326565143824, 'fraction_numerical': 0.04094754653130288, 'mean_word_length': 3.647798742138365, 'pattern_counts': {'":': 0, '<': 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': '2327555', 'n_tokens_mistral': 1071, 'n_tokens_neox': 974, 'n_words': 181}