tests/functional/configuration/test_all_options.py
def check_local_config(self, tmp_path, conf_file, monkeypatch):
        """Check that local configuration overrides global/envvars configuration"""
        name = "local-test"
        command = (
            f"hunt --worker-max-trials 0 -n {name} -c {conf_file} "
            f"python {script} -x~uniform(0,1)"
        )

        assert orion.core.cli.main(command.split(" ")) == 0

        # Test that manual_resolution is True and it branches when changing cli
        assert orion.core.cli.main(f"{command} --cli-change ".split(" ")) == 1

        command = "hunt --auto-resolution " + command[5:]

        command = self._check_cli_change(
            name, command, version=1, change_type=self.local["evc"]["cli_change_type"]
        )
        command = self._check_non_monitored_arguments(
            name,
            command,
            version=2,
            non_monitored_arguments=self.local["evc"]["non_monitored_arguments"],
        )
        self._check_script_config_change(
            tmp_path,
            name,
            command,
            version=2,
            change_type=self.local["evc"]["config_change_type"],
        )
        self._check_code_change(
            monkeypatch,
            name,
            command,
            version=3,
            mock_ignore_code_changes=True,
            ignore_code_changes=self.local["evc"]["ignore_code_changes"],
            change_type=self.local["evc"]["code_change_type"],
        )
Check that local configuration overrides global/envvars configuration
Check that local configuration overrides global/envvars configuration
Check that local configuration overrides global / envvars configuration
def check_local_config(self, tmp_path, conf_file, monkeypatch):
        name = "local-test"
        command = (
            f"hunt --worker-max-trials 0 -n {name} -c {conf_file} "
            f"python {script} -x~uniform(0,1)"
        )
        assert orion.core.cli.main(command.split(" ")) == 0
        assert orion.core.cli.main(f"{command} --cli-change ".split(" ")) == 1
        command = "hunt --auto-resolution " + command[5:]
        command = self._check_cli_change(
            name, command, version=1, change_type=self.local["evc"]["cli_change_type"]
        )
        command = self._check_non_monitored_arguments(
            name,
            command,
            version=2,
            non_monitored_arguments=self.local["evc"]["non_monitored_arguments"],
        )
        self._check_script_config_change(
            tmp_path,
            name,
            command,
            version=2,
            change_type=self.local["evc"]["config_change_type"],
        )
        self._check_code_change(
            monkeypatch,
            name,
            command,
            version=3,
            mock_ignore_code_changes=True,
            ignore_code_changes=self.local["evc"]["ignore_code_changes"],
            change_type=self.local["evc"]["code_change_type"],
        )
def check_local_config ( self , tmp_path , conf_file , monkeypatch ) : name = "local-test" command = ( f"hunt --worker-max-trials 0 -n {name} -c {conf_file} " f"python {script} -x~uniform(0,1)" ) assert orion . core . cli . main ( command . split ( " " ) ) == 0 assert orion . core . cli . main ( f"{command} --cli-change " . split ( " " ) ) == 1 command = "hunt --auto-resolution " + command [ 5 : ] command = self . _check_cli_change ( name , command , version = 1 , change_type = self . local [ "evc" ] [ "cli_change_type" ] ) command = self . _check_non_monitored_arguments ( name , command , version = 2 , non_monitored_arguments = self . local [ "evc" ] [ "non_monitored_arguments" ] , ) self . _check_script_config_change ( tmp_path , name , command , version = 2 , change_type = self . local [ "evc" ] [ "config_change_type" ] , ) self . _check_code_change ( monkeypatch , name , command , version = 3 , mock_ignore_code_changes = True , ignore_code_changes = self . local [ "evc" ] [ "ignore_code_changes" ] , change_type = self . local [ "evc" ] [ "code_change_type" ] , )
Check that local configuration overrides global/envvars configuration
Check that local configuration overrides global / envvars configuration
"""Check that local configuration overrides global/envvars configuration""" # Test that manual_resolution is True and it branches when changing cli
self
tmp_path
conf_file
monkeypatch