<commit_before>from unittest import mock
from unittest.case import TestCase

from click.testing import CliRunner

from semantic_release.cli import main


class CLITests(TestCase):
    def setUp(self):
        self.runner = CliRunner()

    @mock.patch('semantic_release.cli.version')
    def test_main_should_call_correct_function(self, mock_version):
        result = self.runner.invoke(main, ['version'])
        self.assertEqual(result.exit_code, 0)
        mock_version.assert_called_once()

    @mock.patch('semantic_release.cli.tag_new_version')
    @mock.patch('semantic_release.cli.commit_new_version')
    @mock.patch('semantic_release.cli.set_new_version')
    @mock.patch('semantic_release.cli.get_new_version', return_value='2.0.0')<commit_msg>Fix version test, add missing mock<commit_after>from unittest import mock
from unittest.case import TestCase

from click.testing import CliRunner

from semantic_release.cli import main


class CLITests(TestCase):
    def setUp(self):
        self.runner = CliRunner()

    @mock.patch('semantic_release.cli.version')
    def test_main_should_call_correct_function(self, mock_version):
        result = self.runner.invoke(main, ['version'])
        self.assertEqual(result.exit_code, 0)
        mock_version.assert_called_once()

    @mock.patch('semantic_release.cli.config.getboolean', lambda *x: False)
    @mock.patch('semantic_release.cli.tag_new_version')
    @mock.patch('semantic_release.cli.commit_new_version')
    @mock.patch('semantic_release.cli.set_new_version')
    @mock.patch('semantic_release.cli.get_new_version', return_value='2.0.0')
{'fraction_non_alphanumeric': 0.1124922311995028, 'fraction_numerical': 0.004972032318210068, 'mean_word_length': 4.7913669064748206, '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': '4288008', 'n_tokens_mistral': 516, 'n_tokens_neox': 501, 'n_words': 82}