Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanDeHoop committed Dec 17, 2024
1 parent 27f6d41 commit bd16208
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/everest/test_simulator_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from ert.run_models.everest_run_model import EverestRunModel
from everest.config import EverestConfig, SimulatorConfig

CONFIG_FILE = "config_advanced.yml"


def test_simulator_cache(copy_math_func_test_data_to_tmp):
n_evals = 0
Expand All @@ -19,7 +17,7 @@ def new_call(*args):
n_evals += (result.evaluation_ids >= 0).sum()
return result

config = EverestConfig.load_file(CONFIG_FILE)
config = EverestConfig.load_file("config_minimal.yml")
config.simulator = SimulatorConfig(enable_cache=True)

run_model = EverestRunModel.create(config)
Expand All @@ -38,7 +36,7 @@ def new_call(*args):
run_model.run_experiment(evaluator_server_config)
assert n_evals > 0
variables1 = list(run_model.result.controls.values())
assert np.allclose(variables1, [0.1, 0, 0.4], atol=0.02)
assert np.allclose(variables1, [0.5, 0.5, 0.5], atol=0.02)

# Now do another run, where the functions should come from the cache:
n_evals = 0
Expand Down

0 comments on commit bd16208

Please sign in to comment.