<commit_before>from pyjokes.jokes_en import jokes_en
from pyjokes.jokes_de import jokes_de
from pyjokes.jokes_es import jokes_es
from pyjokes.jokes_gl import jokes_gl
from pyjokes.jokes_eu import jokes_eu


#test if joke is windows compatible
def _test_joke_win(joke):
    assert len(joke) <= len(joke.encode('ascii', 'ignore'))

def _test_default_locale(joke):
    import locale
    encod = locale.getdefaultlocale()[1]
    assert len(joke) <= len(joke.encode(encod, 'ignore'))

#unix is full compatible - no need of tests
def test_jokes_lengths():
    jokes_sets = [jokes_en, jokes_es, jokes_de, jokes_gl, jokes_eu]
    for jokes in jokes_sets:
        for j in jokes['all']:
            _test_default_locale(j)
            _test_joke_win(j)<commit_msg>insert italian<commit_after>from pyjokes.jokes_en import jokes_en
from pyjokes.jokes_de import jokes_de
from pyjokes.jokes_es import jokes_es
from pyjokes.jokes_gl import jokes_gl
from pyjokes.jokes_eu import jokes_eu
from pyjokes.jokes_it import jokes_it

#test if joke is windows compatible
def _test_joke_win(joke):
    assert len(joke) <= len(joke.encode('ascii', 'ignore'))

def _test_default_locale(joke):
    import locale
    encod = locale.getdefaultlocale()[1]
    assert len(joke) <= len(joke.encode(encod, 'ignore'))

#unix is full compatible - no need of tests
def test_jokes_lengths():
    jokes_sets = [jokes_en, jokes_es, jokes_de, jokes_gl, jokes_eu, jokes_it]
    for jokes in jokes_sets:
        for j in jokes['all']:
            _test_default_locale(j)
            _test_joke_win(j)
{'fraction_non_alphanumeric': 0.08985879332477535, 'fraction_numerical': 0.0012836970474967907, 'mean_word_length': 4.3944636678200695, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5753059', 'n_tokens_mistral': 554, 'n_tokens_neox': 551, 'n_words': 141}