<commit_before><commit_msg>Addition of some init tests<commit_after>import unittest
from machine import Machine


class MachineTestCase(unittest.TestCase):
    """
    Tests pour la méga machine à caoua
    """

    def test_init_in_maintenance(self):
        mc = Machine()
        self.assertTrue(mc.maintenance)

    def test_init_default_maxstock(self):
        mc = Machine()
        for name, max_stock in mc.max_stock.items():
            self.assertEqual(max_stock, 100)

    def test_init_default_maxcoins(self):
        mc = Machine()
        for value, max_coins in mc.max_coins.items():
            self.assertEqual(max_coins, 100)

    def test_init_empty_stocks(self):
        mc = Machine()
        for name, stock in mc.stock.items():
            self.assertEqual(stock, 0)

    def test_init_empty_coins(self):
        mc = Machine()
        for value, stock in mc.coins.items():
            self.assertEqual(stock, 0)

    def test_init_empty_log(self):
        mc = Machine()
        self.assertEqual(mc.log, [])  # TODO log d'initialisation?
{'fraction_non_alphanumeric': 0.0999057492931197, 'fraction_numerical': 0.007540056550424128, 'mean_word_length': 2.636986301369863, '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': '7342720', 'n_tokens_mistral': 343, 'n_tokens_neox': 315, 'n_words': 76}