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"""
        command = f"hunt --worker-max-trials 0 -c {conf_file} --branch-from test-name"
        command += " " + " ".join(
            "--{} {}".format(name, value) for name, value in self.cmdargs.items()
        )
        orion.core.cli.main(command.split(" "))

        storage = get_storage()

        experiment = get_experiment("exp-name")
        assert experiment.name == "exp-name"
        assert experiment.node.parent.name == "test-name"
        assert experiment.version == 1
        assert experiment.metadata["user"] == self.cmdargs["user"]
        assert experiment.max_trials == self.cmdargs["exp-max-trials"]
        assert experiment.max_broken == self.cmdargs["exp-max-broken"]
        assert experiment.working_dir == self.cmdargs["working-dir"]
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):
        command = f"hunt --worker-max-trials 0 -c {conf_file} --branch-from test-name"
        command += " " + " ".join(
            "--{} {}".format(name, value) for name, value in self.cmdargs.items()
        )
        orion.core.cli.main(command.split(" "))
        storage = get_storage()
        experiment = get_experiment("exp-name")
        assert experiment.name == "exp-name"
        assert experiment.node.parent.name == "test-name"
        assert experiment.version == 1
        assert experiment.metadata["user"] == self.cmdargs["user"]
        assert experiment.max_trials == self.cmdargs["exp-max-trials"]
        assert experiment.max_broken == self.cmdargs["exp-max-broken"]
        assert experiment.working_dir == self.cmdargs["working-dir"]
def check_cmd_args_config ( self , tmp_path , conf_file , monkeypatch ) : command = f"hunt --worker-max-trials 0 -c {conf_file} --branch-from test-name" command += " " + " " . join ( "--{} {}" . format ( name , value ) for name , value in self . cmdargs . items ( ) ) orion . core . cli . main ( command . split ( " " ) ) storage = get_storage ( ) experiment = get_experiment ( "exp-name" ) assert experiment . name == "exp-name" assert experiment . node . parent . name == "test-name" assert experiment . version == 1 assert experiment . metadata [ "user" ] == self . cmdargs [ "user" ] assert experiment . max_trials == self . cmdargs [ "exp-max-trials" ] assert experiment . max_broken == self . cmdargs [ "exp-max-broken" ] assert experiment . working_dir == self . cmdargs [ "working-dir" ]
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