Skip to content

Commit 29645a8

Browse files
fix tests for new esmvalcore config (#4252)
Co-authored-by: Bouwe Andela <[email protected]>
1 parent 32009ad commit 29645a8

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

tests/integration/test_diagnostic_run.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
from pathlib import Path
77
from textwrap import dedent
88

9-
import esmvalcore
109
import pytest
1110
import yaml
1211
from esmvalcore._main import run
13-
from packaging import version
1412

1513

1614
def write_config_file(dirname):
@@ -73,54 +71,6 @@ def check(result_file):
7371
]
7472

7573

76-
@pytest.mark.skipif(
77-
version.parse(esmvalcore.__version__) >= version.parse("2.14.0"),
78-
reason="ESMValCore >= v2.14.0",
79-
)
80-
@pytest.mark.installation
81-
@pytest.mark.parametrize("script_file", SCRIPTS)
82-
def test_diagnostic_run_config_file(tmp_path, script_file):
83-
local_script_file = Path(__file__).parent / script_file
84-
85-
recipe_file = tmp_path / "recipe_test.yml"
86-
script_file = tmp_path / script_file
87-
result_file = tmp_path / "result.yml"
88-
89-
shutil.copy(local_script_file, script_file)
90-
91-
# Create recipe
92-
recipe = dedent(f"""
93-
documentation:
94-
title: Test recipe
95-
description: Recipe with no data.
96-
authors: [andela_bouwe]
97-
98-
diagnostics:
99-
diagnostic_name:
100-
scripts:
101-
script_name:
102-
script: {script_file}
103-
setting_name: {result_file}
104-
""")
105-
recipe_file.write_text(str(recipe))
106-
107-
config_file = write_config_file(tmp_path)
108-
with arguments(
109-
"esmvaltool",
110-
"run",
111-
"--config_file",
112-
config_file,
113-
str(recipe_file),
114-
):
115-
run()
116-
117-
check(result_file)
118-
119-
120-
@pytest.mark.skipif(
121-
version.parse(esmvalcore.__version__) < version.parse("2.12.0"),
122-
reason="ESMValCore < v2.12.0",
123-
)
12474
@pytest.mark.installation
12575
@pytest.mark.parametrize("script_file", SCRIPTS)
12676
def test_diagnostic_run(tmp_path, script_file):

0 commit comments

Comments
 (0)