From a5861d7bfc5ca03a36b0fd322419838afd4232bb Mon Sep 17 00:00:00 2001 From: David Stuebe Date: Wed, 4 Oct 2023 22:57:14 -0400 Subject: [PATCH] fix the test --- kerchunk/tests/test_grib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kerchunk/tests/test_grib.py b/kerchunk/tests/test_grib.py index b0f7bfa5..e5ed8712 100644 --- a/kerchunk/tests/test_grib.py +++ b/kerchunk/tests/test_grib.py @@ -77,5 +77,8 @@ def test_archives(tmpdir, url): xr.testing.assert_allclose(ours, theirs) def test_subhourly(): - result = scan_grib("hrrr.wrfsubhf.sample.grib2") - len(result) == 2 \ No newline at end of file + # two messages extracted from a hrrr output including one with an eccodes + # non-compliant endstep type which raises WrongStepUnitError + fpath = os.path.join(here, "hrrr.wrfsubhf.sample.grib2") + result = scan_grib(fpath) + assert len(result) == 2, "Expected two grib messages"