<commit_before># -*- coding: utf-8 -*-

from subprocess import check_output
from tests.functional_tests import FunctionalTestBase

class TestNoTuttlefile(FunctionalTestBase):

    def test_no_file_in_current_dir(self):
        """ Should display a message if there is no tuttlefile in the current directory"""
        self.work_dir_from_module(__file__)
        code, output = self.run_tuttle()
        # TODO : shouldn't we exit with error code ?
        assert code == 0
        assert output.find("No tuttlefile") >= 0


    def test_tuttle_file_does_not_exist(self):
        """ Should display a message if the tuttlefile passed as argument to the command line does not exist"""
        result = check_output(['python', self._tuttle_cmd, '-f', 'inexistant_file'], shell=True)
        assert result.find("No tuttlefile") >= 0<commit_msg>Removed useless parameter in a test<commit_after># -*- coding: utf-8 -*-

from subprocess import check_output
from tests.functional_tests import FunctionalTestBase

class TestNoTuttlefile(FunctionalTestBase):

    def test_no_file_in_current_dir(self):
        """ Should display a message if there is no tuttlefile in the current directory"""
        self.work_dir_from_module(__file__)
        code, output = self.run_tuttle()
        # TODO : shouldn't we exit with error code ?
        assert code == 0
        assert output.find("No tuttlefile") >= 0


    def test_tuttle_file_does_not_exist(self):
        """ Should display a message if the tuttlefile passed as argument to the command line does not exist"""
        result = check_output(['python', self._tuttle_cmd, '-f', 'inexistant_file'])
        assert result.find("No tuttlefile") >= 0
{'fraction_non_alphanumeric': 0.09349112426035502, 'fraction_numerical': 0.004733727810650888, 'mean_word_length': 3.557951482479784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6268845', 'n_tokens_mistral': 501, 'n_tokens_neox': 466, 'n_words': 153}