diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 770eb9242a..e7acd7767d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,10 +62,14 @@ jobs: run: | python -m pip install --no-deps -e . - - name: Run unit tests - enhancement_tests - enhancements - nwcsaf + - name: Run unit tests - test_netcdf shell: bash -l {0} run: | - pytest satpy/tests/enhancement_tests/test_enhancements.py::test_nwcsaf_comps + pytest test_netcdf.py +# - name: Run unit tests - enhancement_tests - enhancements - nwcsaf +# shell: bash -l {0} +# run: | +# pytest satpy/tests/enhancement_tests/test_enhancements.py::test_nwcsaf_comps - name: Run unit tests - scene_tests shell: bash -l {0} run: | diff --git a/test_netcdf.py b/test_netcdf.py new file mode 100644 index 0000000000..35a2286d72 --- /dev/null +++ b/test_netcdf.py @@ -0,0 +1,16 @@ +import xarray as xr + + +def test_netcdf(tmp_path): + fn = "test.nc" + fk = tmp_path / fn + # create a minimally fake netCDF file, otherwise satpy won't load the composite + ds = xr.Dataset( + coords={"nx": [0], "ny": [0]}, + attrs={ + "source": "satpy unit test", + "time_coverage_start": "0001-01-01T00:00:00Z", + "time_coverage_end": "0001-01-01T01:00:00Z", + } + ) + ds.to_netcdf(fk)