tests/functional/configuration/test_all_options.py
def check_cmd_args_config(self, tmp_path, conf_file, monkeypatch):
        """Check that cmdargs configuration overrides global/envvars/local configuration"""
        config = {
            "heartbeat": self.cmdargs["heartbeat"],
            "max_trials": self.cmdargs["worker-max-trials"],
            "max_broken": self.cmdargs["worker-max-broken"],
            "max_idle_time": self.cmdargs["max-idle-time"],
            "interrupt_signal_code": self.cmdargs["interrupt-signal-code"],
            "user_script_config": self.cmdargs["user-script-config"],
        }

        self._mock_consumer(monkeypatch)
        self._mock_producer(monkeypatch)
        self._mock_workon(monkeypatch)

        command = f"hunt --worker-max-trials 0 -c {conf_file} -n cmd-test"
        command += " " + " ".join(
            "--{} {}".format(name, value) for name, value in self.cmdargs.items()
        )
        command += f" python {script} -x~uniform(0,1)"
        orion.core.cli.main(command.split(" "))

        self._check_consumer(config)
        self._check_producer(config)
        self._check_workon(config)
Check that cmdargs configuration overrides global/envvars/local configuration
Check that cmdargs configuration overrides global/envvars/local configuration
Check that cmdargs configuration overrides global / envvars / local configuration
def check_cmd_args_config(self, tmp_path, conf_file, monkeypatch):
        config = {
            "heartbeat": self.cmdargs["heartbeat"],
            "max_trials": self.cmdargs["worker-max-trials"],
            "max_broken": self.cmdargs["worker-max-broken"],
            "max_idle_time": self.cmdargs["max-idle-time"],
            "interrupt_signal_code": self.cmdargs["interrupt-signal-code"],
            "user_script_config": self.cmdargs["user-script-config"],
        }
        self._mock_consumer(monkeypatch)
        self._mock_producer(monkeypatch)
        self._mock_workon(monkeypatch)
        command = f"hunt --worker-max-trials 0 -c {conf_file} -n cmd-test"
        command += " " + " ".join(
            "--{} {}".format(name, value) for name, value in self.cmdargs.items()
        )
        command += f" python {script} -x~uniform(0,1)"
        orion.core.cli.main(command.split(" "))
        self._check_consumer(config)
        self._check_producer(config)
        self._check_workon(config)
def check_cmd_args_config ( self , tmp_path , conf_file , monkeypatch ) : config = { "heartbeat" : self . cmdargs [ "heartbeat" ] , "max_trials" : self . cmdargs [ "worker-max-trials" ] , "max_broken" : self . cmdargs [ "worker-max-broken" ] , "max_idle_time" : self . cmdargs [ "max-idle-time" ] , "interrupt_signal_code" : self . cmdargs [ "interrupt-signal-code" ] , "user_script_config" : self . cmdargs [ "user-script-config" ] , } self . _mock_consumer ( monkeypatch ) self . _mock_producer ( monkeypatch ) self . _mock_workon ( monkeypatch ) command = f"hunt --worker-max-trials 0 -c {conf_file} -n cmd-test" command += " " + " " . join ( "--{} {}" . format ( name , value ) for name , value in self . cmdargs . items ( ) ) command += f" python {script} -x~uniform(0,1)" orion . core . cli . main ( command . split ( " " ) ) self . _check_consumer ( config ) self . _check_producer ( config ) self . _check_workon ( config )
Check that cmdargs configuration overrides global/envvars/local configuration
Check that cmdargs configuration overrides global / envvars / local configuration
"""Check that cmdargs configuration overrides global/envvars/local configuration"""
self
tmp_path
conf_file
monkeypatch