def setUp(self):
        """
        Setups everything needed for the tests.
        """

        PyFunceble.INTERN = {
            "counter": {
                "number": {
                    "down": 0,
                    "invalid": 0,
                    "tested": 0,
                    "up": 0
                },
                "percentage": {
                    "down": 0,
                    "invalid": 0,
                    "up": 0
                },
            }
        }
        PyFunceble.load_config()
        StdoutBase.setUp(self)

        PyFunceble.cconfig.Preset().init_all()

        PyFunceble.CONFIGURATION.show_percentage = True
        PyFunceble.CONFIGURATION.syntax = False
        PyFunceble.CONFIGURATION.reputation = False
Exemple #2
0
    def setUp(self):
        """
        Setups everything needed for the tests.
        """

        init_colorama(autoreset=True)

        PyFunceble.load_config()

        StdoutBase.setUp(self)

        self.green_ascii = "\n".join(
            [
                f"{Fore.GREEN}{x}{Fore.RESET}"
                for x in PyFunceble.ASCII_PYFUNCEBLE.split("\n")
            ]
        )
        self.red_ascii = "\n".join(
            [
                f"{Fore.RED}{x}{Fore.RESET}"
                for x in PyFunceble.ASCII_PYFUNCEBLE.split("\n")
            ]
        )
        self.home_ascii = "\n".join(
            [
                f"{Fore.YELLOW}{x}{Fore.RESET}"
                for x in PyFunceble.ASCII_PYFUNCEBLE.split("\n")
            ]
        )

        self.cli_core = CLI()
    def setUp(self):
        """
        Setups everything needed for the tests.
        """

        PyFunceble.load_config()

        StdoutBase.setUp(self)

        self.file = "the_file_is_a_ghost"
        self.to_print = {
            "basic": {
                "hello": 5,
                "world": 6,
                "here": 7,
                "is": 8,
                "PyFunceble": 10
            },
            "size_constructor": [5, 6, 7, 8, 9, 10],
            "basic_string": "Hello, World!",
            "hosts": {
                "0.0.0.0": 7,
                "hello.world": 11
            },
        }

        self.file_instance = PyFunceble.helpers.File(self.file)
        self.file_instance.delete()
    def tearDown(self):
        """
        Setups everything we need after the tests.
        """

        self.file_instance.delete()

        StdoutBase.tearDown(self)
Exemple #5
0
    def setUp(self):
        """
        Setups everything needed for the tests
        """

        PyFunceble.load_config(generate_directory_structure=False)

        initiate_colorama(True)

        StdoutBase.setUp(self)
Exemple #6
0
    def tearDown(self):
        """
        Setups everything needed for after the tests.
        """

        StdoutBase.tearDown(self)