Commit ac72e9a1 authored by Marco Di Bari's avatar Marco Di Bari
Browse files

Fix skip condition using eccodes import instead of python modules in...

Fix skip condition using eccodes import instead of python modules in validation tests about MSGCLAP and MSGAMVE products. Those python modules are always imported without errors.
parent 3e44181b
......@@ -18,10 +18,10 @@ import pytest
from epct import api
from epct import etc
try:
from epct_plugin_gis import msg_meteo_bufr
MSGCLAP_SUPPORT = True
import eccodes
ECCODES_INSTALLED = True
except:
MSGCLAP_SUPPORT = False
ECCODES_INSTALLED = False
EPCT_MAIN_PATH = os.path.dirname(__file__).split(os.path.join("validation_tests"))[0]
......@@ -59,7 +59,7 @@ def create_epct_output_file(tmpdir):
return output_files[0]
@pytest.mark.skipif(MSGCLAP_SUPPORT is False, reason="requires eccodes tool installed")
@pytest.mark.skipif(ECCODES_INSTALLED is False, reason="requires eccodes tool installed")
def test_generate_outputs(tmpdir):
epct_files = create_epct_output_file(tmpdir)
if isinstance(epct_files, str):
......
......@@ -22,10 +22,10 @@ from epct import api
from epct import etc
try:
from epct_plugin_gis import msg_meteo_bufr
MSGCLAP_SUPPORT = True
import eccodes
ECCODES_INSTALLED = True
except:
MSGCLAP_SUPPORT = False
ECCODES_INSTALLED = False
import utils
......@@ -97,7 +97,7 @@ def create_epct_output_file(tmpdir):
return output_files[0]
@pytest.mark.skipif(MSGCLAP_SUPPORT is False, reason="requires eccodes tool installed")
@pytest.mark.skipif(ECCODES_INSTALLED is False, reason="requires eccodes tool installed")
def test_generate_outputs(tmpdir):
epct_files = create_epct_output_file(tmpdir)
if isinstance(epct_files, str):
......@@ -107,7 +107,7 @@ def test_generate_outputs(tmpdir):
assert os.path.isfile(of) is True
@pytest.mark.skipif(MSGCLAP_SUPPORT is False, reason="requires eccodes tool installed")
@pytest.mark.skipif(ECCODES_INSTALLED is False, reason="requires eccodes tool installed")
def test_outputs(tmpdir):
_, etc_dir = create_config_in_tmpdir(tmpdir)
output_files = glob.glob(os.path.join(f'{OUTPUT_DIR}', '*.nc'))
......
......@@ -19,10 +19,10 @@ from epct import api
from epct import etc
try:
from epct_plugin_gis import msg_meteo_bufr
MSGCLAP_SUPPORT = True
import eccodes
ECCODES_INSTALLED = True
except:
MSGCLAP_SUPPORT = False
ECCODES_INSTALLED = False
import utils
......@@ -67,7 +67,7 @@ def create_epct_output_file(tmpdir, chain_config):
@pytest.mark.regression
@pytest.mark.skipif(MSGCLAP_SUPPORT is False, reason="requires eccodes tool installed")
@pytest.mark.skipif(ECCODES_INSTALLED is False, reason="requires eccodes tool installed")
def test_generate_outputs(tmpdir):
chain_config = {
"product": PRODUCT_ID,
......
......@@ -19,10 +19,10 @@ from epct import api
from epct import etc
try:
from epct_plugin_gis import msg_meteo_bufr_encoding
MSGAMVE_SUPPORT = True
import eccodes
ECCODES_INSTALLED = True
except:
MSGAMVE_SUPPORT = False
ECCODES_INSTALLED = False
EPCT_MAIN_PATH = os.path.dirname(__file__).split(os.path.join("validation_tests"))[0]
......@@ -62,7 +62,7 @@ def create_epct_output_file(tmpdir, chain_config):
@pytest.mark.regression
@pytest.mark.skipif(MSGAMVE_SUPPORT is False, reason="requires eccodes tool installed")
@pytest.mark.skipif(ECCODES_INSTALLED is False, reason="requires eccodes tool installed")
def test_generate_outputs(tmpdir):
chain_config = {
"product": PRODUCT_ID,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment