Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions tests/integration/test_cmorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os
import sys

import esmvalcore
import iris
import iris.coord_systems
import iris.coords
Expand All @@ -14,9 +13,7 @@
import pytest
import yaml
from cf_units import Unit
from packaging import version

from esmvaltool import ESMValToolDeprecationWarning
from esmvaltool.cmorizers.data.cmorizer import DataCommand


Expand Down Expand Up @@ -155,54 +152,6 @@ def arguments(*args):
sys.argv = backup


@pytest.mark.skipif(
version.parse(esmvalcore.__version__) >= version.parse("2.14.0"),
reason="ESMValCore >= v2.14.0",
)
def test_cmorize_obs_woa_no_data_config_file(tmp_path):
"""Test for example run of cmorize_obs command."""
config_file = write_config_file(tmp_path)
os.makedirs(os.path.join(tmp_path, "raw_stuff", "Tier2"))
os.makedirs(os.path.join(tmp_path, "output_dir"))
with keep_cwd():
with pytest.raises(RuntimeError):
with pytest.warns(ESMValToolDeprecationWarning):
DataCommand().format("WOA", config_file=config_file)

log_dir = os.path.join(tmp_path, "output_dir")
log_file = os.path.join(
log_dir, os.listdir(log_dir)[0], "run", "main_log.txt"
)
check_log_file(log_file, no_data=True)


@pytest.mark.skipif(
version.parse(esmvalcore.__version__) >= version.parse("2.14.0"),
reason="ESMValCore >= v2.14.0",
)
def test_cmorize_obs_woa_data_config_file(tmp_path):
"""Test for example run of cmorize_obs command."""
config_file = write_config_file(tmp_path)
data_path = os.path.join(tmp_path, "raw_stuff", "Tier2", "WOA")
put_dummy_data(data_path)
with keep_cwd():
with pytest.warns(ESMValToolDeprecationWarning):
DataCommand().format("WOA", config_file=config_file)

log_dir = os.path.join(tmp_path, "output_dir")
log_file = os.path.join(
log_dir, os.listdir(log_dir)[0], "run", "main_log.txt"
)
check_log_file(log_file, no_data=False)
output_path = os.path.join(log_dir, os.listdir(log_dir)[0], "Tier2", "WOA")
check_output_exists(output_path)
check_conversion(output_path)


@pytest.mark.skipif(
version.parse(esmvalcore.__version__) < version.parse("2.12.0"),
reason="ESMValCore < v2.12.0",
)
def test_cmorize_obs_woa_no_data(tmp_path):
"""Test for example run of cmorize_obs command."""
write_config_file(tmp_path)
Expand All @@ -218,10 +167,6 @@ def test_cmorize_obs_woa_no_data(tmp_path):
check_log_file(log_file, no_data=True)


@pytest.mark.skipif(
version.parse(esmvalcore.__version__) < version.parse("2.12.0"),
reason="ESMValCore < v2.12.0",
)
def test_cmorize_obs_woa_data(tmp_path):
"""Test for example run of cmorize_obs command."""
write_config_file(tmp_path)
Expand Down