<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals, division

import string

from five.five import Five
import pytest


def test_five():
    five = Five()

    assert five() == 5
    assert five() != 6
    assert five() * five() == 25
    assert five() + five() == 10
    assert five() / five() == 1
    assert five() - five() == 0
    assert five() / five() * five() == five()

    assert five.up_high() == '⁵'
    assert five.down_low() == '₅'
    assert five.roman() == 'V'

    assert five.arabic() == 'خمسة'
    assert five.azerbaijani() == 'beş'
    assert five.basque() == 'bost'
    assert five.belarusian() == 'пяць'
    assert five.bosnian() == 'pet'
    assert five.bulgarian() == 'пет'
    assert five.catalan() == 'cinc'
    assert five.chinese() == '五'
    assert five.choctaw() == 'tahlapi'
    assert five.croatian() == 'pet'
    assert five.czech() == 'pět'
    assert five.dovah() == 'hen'
    assert five.dutch() == 'vijf'
    assert five.elvish() == 'lempe'
    assert five.english() == 'five'
    assert five.estonian() == 'viis'
    assert five.finnish() == 'viisi'
    assert five.french() == 'cinq'
    assert five.german() == 'fünf'
    assert five.greek() == 'πέντε'
    assert five.hebrew() == 'חמש'
    assert five.hindi() == 'पांच'
    assert five.hungarian() == 'öt'
    assert five.indonesian() == 'lima'
    assert five.irish() == 'cúig'
    assert five.italian() == 'cinque'
    assert five.japanese() == '五'
    assert five.kannada() == 'ಐದು'
    assert five.klingon() == 'vagh'
    assert five.korean() == '오'
    assert five.latin() == 'quinque'
    assert five.latvian() == 'pieci'
    assert five.lithuanian() == 'penki'
    assert five.mongolian() == 'таван'
    assert five.norwegian() == 'fem'
    assert five.persian() == 'پنج'
    assert five.piglatin() == 'ivefay'
    assert five.polish() == 'pięć'
    assert five.portuguese() == 'cinco'
    assert five.romanian() == 'cinci'
    assert five.russian() == 'пять'
    assert five.serbian() == 'pet'
    assert five.slovakian() == 'päť'
    assert five.slovenian() == 'pet'
    assert five.spanish() == 'cinco'
    assert five.swedish() == 'fem'
    assert five.tamil() == 'ஐந்து'
    assert five.telugu() == 'ఐదు'
    assert five.turkish() == 'beş'
    assert five.thai() == 'ห้า'
    assert five.ukrainian() == 'п’ять'
    assert five.welsh() == 'pump'

    assert five.morse_code() == '....-'
    assert five.binary() == '101'
    assert five.octal() == '5'
    assert five.hex() == '5'

    assert five.negative() == -5
    assert five.loud() == 'FIVE'
    assert five.loud('piglatin') == 'IVEFAY'
    assert five.smooth() == 'S'
    assert five.too_slow() == 5

    assert five.map([1, 2, 3]) == [5, 5, 5]
    assert five.reduce([1, 2, 3]) == 5

    assert five.jackson() == ['Jackie', 'Tito', 'Jermaine', 'Marlon',
                              'Michael']
    assert five.fab() == ['<NAME>', '<NAME>', '<NAME>',
                          '<NAME>', '<NAME>']

    assert five.rotate(string.digits) == '5678901234'
    assert five.rotate(string.lowercase) == ('fghijklmnopqrstuvwxyzabcde')
    assert five.rotate(string.uppercase) == ('FGHIJKLMNOPQRSTUVWXYZABCDE')
    assert five.rotate('$_$ -,- @.@?') == '$_$ -,- @.@?'

    assert five.oclock() == '🕔'<commit_msg>Group the tests into different types<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals, division

import string
from unittest import TestCase

from five.five import Five
import pytest


class TestFive(TestCase):
    def setUp(self):
        self.five = Five()

    def test_basic_five(self):
        assert self.five() == 5
        assert self.five() != 6

    def test_operations_of_five(self):
        assert self.five() * self.five() == 25
        assert self.five() + self.five() == 10
        assert self.five() / self.five() == 1
        assert self.five() - self.five() == 0
        assert self.five() / self.five() * self.five() == self.five()

    def test_different_sorts_of_five(self):
        assert self.five.up_high() == '⁵'
        assert self.five.down_low() == '₅'
        assert self.five.too_slow() == 5
        assert self.five.roman() == 'V'
        assert self.five.morse_code() == '....-'
        assert self.five.negative() == -5
        assert self.five.loud() == 'FIVE'
        assert self.five.loud('piglatin') == 'IVEFAY'
        assert self.five.smooth() == 'S'

    def test_multilingual_five(self):
        assert self.five.arabic() == 'خمسة'
        assert self.five.azerbaijani() == 'beş'
        assert self.five.basque() == 'bost'
        assert self.five.belarusian() == 'пяць'
        assert self.five.bosnian() == 'pet'
        assert self.five.bulgarian() == 'пет'
        assert self.five.catalan() == 'cinc'
        assert self.five.chinese() == '五'
        assert self.five.choctaw() == 'tahlapi'
        assert self.five.croatian() == 'pet'
        assert self.five.czech() == 'pět'
        assert self.five.dovah() == 'hen'
        assert self.five.dutch() == 'vijf'
        assert self.five.elvish() == 'lempe'
        assert self.five.english() == 'five'
        assert self.five.estonian() == 'viis'
        assert self.five.finnish() == 'viisi'
        assert self.five.french() == 'cinq'
        assert self.five.german() == 'fünf'
        assert self.five.greek() == 'πέντε'
        assert self.five.hebrew() == 'חמש'
        assert self.five.hindi() == 'पांच'
        assert self.five.hungarian() == 'öt'
        assert self.five.indonesian() == 'lima'
        assert self.five.irish() == 'cúig'
        assert self.five.italian() == 'cinque'
        assert self.five.japanese() == '五'
        assert self.five.kannada() == 'ಐದು'
        assert self.five.klingon() == 'vagh'
        assert self.five.korean() == '오'
        assert self.five.latin() == 'quinque'
        assert self.five.latvian() == 'pieci'
        assert self.five.lithuanian() == 'penki'
        assert self.five.mongolian() == 'таван'
        assert self.five.norwegian() == 'fem'
        assert self.five.persian() == 'پنج'
        assert self.five.piglatin() == 'ivefay'
        assert self.five.polish() == 'pięć'
        assert self.five.portuguese() == 'cinco'
        assert self.five.romanian() == 'cinci'
        assert self.five.russian() == 'пять'
        assert self.five.serbian() == 'pet'
        assert self.five.slovakian() == 'päť'
        assert self.five.slovenian() == 'pet'
        assert self.five.spanish() == 'cinco'
        assert self.five.swedish() == 'fem'
        assert self.five.tamil() == 'ஐந்து'
        assert self.five.telugu() == 'ఐదు'
        assert self.five.turkish() == 'beş'
        assert self.five.thai() == 'ห้า'
        assert self.five.ukrainian() == 'п’ять'
        assert self.five.welsh() == 'pump'

    def test_redix_of_five(self):
        assert self.five.binary() == '101'
        assert self.five.octal() == '5'
        assert self.five.hex() == '5'

    def test_map_and_reduce_of_five(self):
        assert self.five.map([1, 2, 3]) == [5, 5, 5]
        assert self.five.reduce([1, 2, 3]) == 5

    def test_novelty_five(self):
        assert self.five.jackson() == ['Jackie', 'Tito', 'Jermaine', 'Marlon',
                                       'Michael']
        assert self.five.fab() == ['<NAME>', '<NAME>', '<NAME>',
                                   '<NAME>', '<NAME>']

    def test_rotation_of_five(self):
        assert self.five.rotate(string.digits) == '5678901234'
        assert self.five.rotate(string.lowercase) == (
            'fghijklmnopqrstuvwxyzabcde')
        assert self.five.rotate(string.uppercase) == (
            'FGHIJKLMNOPQRSTUVWXYZABCDE')
        assert self.five.rotate('$_$ -,- @.@?') == '$_$ -,- @.@?'

    def test_unicode_of_five(self):
        assert self.five.oclock() == '🕔'
{'fraction_non_alphanumeric': 0.18509127789046653, 'fraction_numerical': 0.009127789046653144, 'mean_word_length': 2.4845406360424027, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7520191', 'n_tokens_mistral': 2906, 'n_tokens_neox': 2811, 'n_words': 588}