Skip to content

Commit 9fcc963

Browse files
committed
Skip test if netcdf module is missing
1 parent 9ab1543 commit 9fcc963

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pysteps/tests/test_exporters.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
from pysteps.io.exporters import export_forecast_dataset
88
from pysteps.io.exporters import close_forecast_files
99

10-
import pysteps
10+
import numpy as np
1111
import os
12+
import pysteps
13+
import pytest
1214
import tempfile
13-
import numpy as np
15+
1416

1517

1618
def test_get_geotiff_filename():
@@ -32,6 +34,9 @@ def test_get_geotiff_filename():
3234

3335
def test_io_export_netcdf_one_member_one_time_step():
3436
"""Test the export netcdf."""
37+
38+
pytest.importorskip('netCDF4')
39+
3540
# open a netcdf file
3641
root_path = pysteps.rcparams.data_sources["bom"]["root_path"]
3742
rel_path = os.path.join("prcp-cscn", "2", "2018", "06", "16")

0 commit comments

Comments
 (0)