diff --git a/tests/everest/test_data/snake_oil/eclipse/include/grid/CASE.EGRID b/tests/everest/test_data/snake_oil/eclipse/include/grid/CASE.EGRID deleted file mode 100644 index 33da9f7a70e..00000000000 Binary files a/tests/everest/test_data/snake_oil/eclipse/include/grid/CASE.EGRID and /dev/null differ diff --git a/tests/everest/test_data/snake_oil/eclipse/model/SNAKE_OIL.DATA b/tests/everest/test_data/snake_oil/eclipse/model/SNAKE_OIL.DATA deleted file mode 100644 index e0a2329dda4..00000000000 --- a/tests/everest/test_data/snake_oil/eclipse/model/SNAKE_OIL.DATA +++ /dev/null @@ -1,4 +0,0 @@ -START - --- DAY MONTH YEAR - 1 'JAN' 2017 / diff --git a/tests/everest/test_data/snake_oil/everest/model/snake_oil_all.yml b/tests/everest/test_data/snake_oil/everest/model/snake_oil_all.yml deleted file mode 100644 index b85ff6305da..00000000000 --- a/tests/everest/test_data/snake_oil/everest/model/snake_oil_all.yml +++ /dev/null @@ -1,93 +0,0 @@ -# A version of snake_oil.yml where all level one keys are added -definitions: - scratch: /tmp/everest/super/scratch - eclbase: model/SNAKE_OIL - -wells: - - {name: W1} - - {name: W2} - - {name: W3} - - {name: W4} - -controls: - - - name: group - type: well_control - min: 0 - max: 1 - variables: - - - name: W1 - initial_guess: 0 - - - name: W2 - initial_guess: 0 - - - name: W3 - initial_guess: 1 - - - name: W4 - initial_guess: 1 - - - name: super_scalars - type: generic_control - variables: - - - name: gravity - initial_guess: 9.81 - min: 0 - max: 1000 - -objective_functions: - - - name: snake_oil_nvp - -input_constraints: - - - target: 1.0 - weights: - group.W1: 1 - group.W2: 1 - group.W3: 1 - group.W4: 1 - -install_jobs: - - - name: snake_oil_diff - source: ../../jobs/SNAKE_OIL_DIFF - - - name: snake_oil_simulator - source: ../../jobs/SNAKE_OIL_SIMULATOR - - - name: snake_oil_npv - source: ../../jobs/SNAKE_OIL_NPV - -install_data: - - - source: ../../eclipse/include/grid/CASE.EGRID - target: MY_GRID.EGRID - - - source: ../../eclipse/model/SNAKE_OIL.DATA - target: SNAKE_OIL.DATA - -optimization: - algorithm: optpp_q_newton - -environment: - simulation_folder: r{{ scratch }}/simulations - -simulator: - queue_system: lsf - cores: 3 - name: mr - resubmit_limit: 17 - options: span = 1 && select[x86 and GNU/Linux] - server: lx-fastserver01 - -model: - realizations: [0, 1, 2] - -forward_model: - - snake_oil_simulator - - snake_oil_npv - - snake_oil_diff diff --git a/tests/everest/test_data/snake_oil/jobs b/tests/everest/test_data/snake_oil/jobs deleted file mode 120000 index ba95610ece3..00000000000 --- a/tests/everest/test_data/snake_oil/jobs +++ /dev/null @@ -1 +0,0 @@ -../../../../test-data/ert/snake_oil/forward_models \ No newline at end of file diff --git a/tests/everest/test_everlint.py b/tests/everest/test_everlint.py index 62f92cc986c..b8aa0768bb4 100644 --- a/tests/everest/test_everlint.py +++ b/tests/everest/test_everlint.py @@ -12,8 +12,6 @@ from tests.everest.test_config_validation import has_error from tests.everest.utils import relpath -SNAKE_OIL_CONFIG = relpath("test_data/snake_oil/", "everest/model/snake_oil_all.yml") - @pytest.fixture def min_config(): @@ -350,34 +348,30 @@ def test_init_context_controls(): assert len(EverestConfig.lint_config_dict(config)) > 0 -def test_date_type(): - valid_dates = ( - "2000-1-1", - "2010-1-1", - "2018-12-31", - ) - - invalid_dates = ( - "32.01.2000", - "2000-1-32", - "fdsafdas", - "01-01-01", - "...", - None, - {}, - "2000-2-30", +@pytest.mark.parametrize( + "date, valid", + [ + ("2000-1-1", True), + ("2010-1-1", True), + ("2018-12-31", True), + ("32.01.2000", False), + ("2000-1-32", False), + ("fdsafdas", False), + ("01-01-01", False), + ("...", False), + (None, False), + ("2000-2-30", False), + ], +) +def test_date_type(date, valid, min_config): + expectation = ( + does_not_raise() + if valid + else pytest.raises(ValidationError, match=f"malformed date: {date}") ) - - for date in valid_dates + invalid_dates: - config = yaml_file_to_substituted_config_dict(SNAKE_OIL_CONFIG) - config[ConfigKeys.WELLS][0][ConfigKeys.DRILL_DATE] = date - - err = EverestConfig.lint_config_dict(config) - if date in valid_dates: - assert not err - else: - assert len(err) > 0, "%s was wrongly accepted" % date - has_error(err, match=f"malformed date: {date}(.*)") + min_config["wells"] = [{"drill_date": date, "name": "test"}] + with expectation: + EverestConfig(**min_config) @pytest.mark.fails_on_macos_github_workflow diff --git a/tests/everest/test_res_initialization.py b/tests/everest/test_res_initialization.py index fc654338a9a..46903c6c111 100644 --- a/tests/everest/test_res_initialization.py +++ b/tests/everest/test_res_initialization.py @@ -22,8 +22,6 @@ skipif_no_opm, ) -TUTORIAL_CONFIG_DIR = "mocked_test_case" - @pytest.mark.parametrize( "config, expected",