From 608a972b7b53173f1f09154aa70e06acd28dcc05 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 4 Dec 2017 16:43:17 -0700 Subject: [PATCH] Add test for regex fix in #173 --- siphon/tests/test_catalog.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/siphon/tests/test_catalog.py b/siphon/tests/test_catalog.py index 0d850299f..b2b7c00fc 100644 --- a/siphon/tests/test_catalog.py +++ b/siphon/tests/test_catalog.py @@ -175,6 +175,16 @@ def test_datasets_nearest_time(): assert nearest.title == 'NAM_CONUS_20km_noaaport_20150528_1800.grib1' +@recorder.use_cassette('top_level_20km_rap_catalog') +def test_datasets_nearest_time_30(): + """Test getting dataset by time --check for a day in the 30s (#gh-173)""" + url = ('http://thredds.ucar.edu/thredds/catalog/grib/NCEP/NAM/' + 'CONUS_20km/noaaport/catalog.xml') + cat = TDSCatalog(url) + nearest = cat.catalog_refs.filter_time_nearest(datetime(2015, 5, 30, 11)) + assert nearest.title == 'NAM_CONUS_20km_noaaport_20150530_1200.grib1' + + @recorder.use_cassette('top_level_20km_rap_catalog') def test_datasets_nearest_time_raises(): """Test getting dataset by time using filenames."""