<commit_before>import unittest
from unittest.mock import patch

import shell


class ShellTest(unittest.TestCase):
    @patch('shell.shouter')
    @patch('shell.call')
    def testWhenLoggingShellComandsIsDisabled_ExpectNoOutput(self, subprocess_call_mock, shouter_mock):
        shell.logcommands = False
        shell.execute("doSomething")
        assert not shouter_mock.called

    @patch('shell.shouter')
    @patch('shell.call')
    def testWhenLoggingShellComandsIsEnabled_ExpectCommandIsLoggedToOutput(self, subprocess_call_mock, shouter_mock):
        shell.logcommands = True
        shell.execute("doSomething")
        assert not shouter_mock.called<commit_msg>fixed assert (typo) and fixed method call of mock<commit_after>import unittest
from unittest.mock import patch

import shell


class ShellTest(unittest.TestCase):
    @patch('shell.shouter')
    @patch('shell.call')
    def testWhenLoggingShellComandsIsDisabled_ExpectNoOutput(self, subprocess_call_mock, shouter_mock):
        shell.logcommands = False
        shell.execute("doSomething")
        assert not shouter_mock.shout.called

    @patch('shell.shouter')
    @patch('shell.call')
    def testWhenLoggingShellComandsIsEnabled_ExpectCommandIsLoggedToOutput(self, subprocess_call_mock, shouter_mock):
        shell.logcommands = True
        shell.execute("doSomething")
        assert shouter_mock.shout.called
{'fraction_non_alphanumeric': 0.08620689655172414, 'fraction_numerical': 0.0, 'mean_word_length': 4.44140625, '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': '1160532', 'n_tokens_mistral': 405, 'n_tokens_neox': 400, 'n_words': 74}