From 800156c1f85fbe70155da55aade5af5f319c9923 Mon Sep 17 00:00:00 2001 From: Valentin Krasontovitsch Date: Wed, 30 Aug 2023 14:38:51 +0200 Subject: [PATCH] fixup! remove slow test - eivind --- tests/unit_tests/test_load_forward_model.py | 45 --------------------- 1 file changed, 45 deletions(-) diff --git a/tests/unit_tests/test_load_forward_model.py b/tests/unit_tests/test_load_forward_model.py index 808a601176a..e5054396799 100644 --- a/tests/unit_tests/test_load_forward_model.py +++ b/tests/unit_tests/test_load_forward_model.py @@ -1,6 +1,4 @@ -import fileinput import logging -import os from datetime import datetime from pathlib import Path from textwrap import dedent @@ -39,49 +37,6 @@ def run_simulator(time_step_count, start_date) -> EclSum: return ecl_sum -@pytest.mark.usefixtures("copy_snake_oil_case_storage") -def test_load_inconsistent_time_map_summary(caplog): - """ - Checking that we dont util_abort, we fail the forward model instead - """ - cwd = os.getcwd() - - # Get rid of GEN_DATA as we are only interested in SUMMARY - with fileinput.input("snake_oil.ert", inplace=True) as fin: - for line in fin: - if line.startswith("GEN_DATA"): - continue - print(line, end="") - - facade = LibresFacade.from_config_file("snake_oil.ert") - realisation_number = 0 - storage = open_storage(facade.enspath, mode="w") - ensemble = storage.get_ensemble_by_name("default_0") - assert ( - ensemble.state_map[realisation_number] == RealizationState.HAS_DATA - ) # Check prior state - - # Create a result that is incompatible with the refcase - run_path = Path("storage") / "snake_oil" / "runpath" / "realization-0" / "iter-0" - os.chdir(run_path) - ecl_sum = run_simulator(1, datetime(2000, 1, 1)) - ecl_sum.fwrite() - os.chdir(cwd) - - realizations = [False] * facade.get_ensemble_size() - realizations[realisation_number] = True - with caplog.at_level(logging.WARNING): - loaded = facade.load_from_forward_model(ensemble, realizations, 0) - assert ( - "Realization: 0, load warning: 1 inconsistencies in time map, first: " - "Time mismatch for step: 1, response time: 2000-01-10 00:00:00, " - "reference case: 2010-01-10 00:00:00, last: Time mismatch for step: " - "1, response time: 2000-01-10 00:00:00, reference case: 2010-01-10 " - f"00:00:00 from: {run_path.absolute()}/SNAKE_OIL_FIELD.UNSMRY" - ) in caplog.messages - assert loaded == 1 - - @pytest.mark.usefixtures("copy_snake_oil_case_storage") def test_load_forward_model(snake_oil_default_storage): """