tests/functional/configuration/test_all_options.py
def check_global_config(self, tmp_path, monkeypatch):
        """Check that global configuration is set properly"""
        update_singletons()

        assert orion.core.config.database.to_dict() == self.config["database"]

        with pytest.raises(SingletonNotInstantiatedError):
            get_storage()

        command = f"hunt --exp-max-trials 0 -n test python {script} -x~uniform(0,1)"
        orion.core.cli.main(command.split(" "))

        storage = get_storage()
        assert isinstance(storage, Legacy)
        assert isinstance(storage._db, PickledDB)
        assert storage._db.host == "dbhere.pkl"
Check that global configuration is set properly
Check that global configuration is set properly
Check that global configuration is set properly
def check_global_config(self, tmp_path, monkeypatch):
        update_singletons()
        assert orion.core.config.database.to_dict() == self.config["database"]
        with pytest.raises(SingletonNotInstantiatedError):
            get_storage()
        command = f"hunt --exp-max-trials 0 -n test python {script} -x~uniform(0,1)"
        orion.core.cli.main(command.split(" "))
        storage = get_storage()
        assert isinstance(storage, Legacy)
        assert isinstance(storage._db, PickledDB)
        assert storage._db.host == "dbhere.pkl"
def check_global_config ( self , tmp_path , monkeypatch ) : update_singletons ( ) assert orion . core . config . database . to_dict ( ) == self . config [ "database" ] with pytest . raises ( SingletonNotInstantiatedError ) : get_storage ( ) command = f"hunt --exp-max-trials 0 -n test python {script} -x~uniform(0,1)" orion . core . cli . main ( command . split ( " " ) ) storage = get_storage ( ) assert isinstance ( storage , Legacy ) assert isinstance ( storage . _db , PickledDB ) assert storage . _db . host == "dbhere.pkl"
Check that global configuration is set properly
Check that global configuration is set properly
"""Check that global configuration is set properly"""
self
tmp_path
monkeypatch