diff --git a/src/siphon/ncss.py b/src/siphon/ncss.py index abc762757..37f7596d8 100644 --- a/src/siphon/ncss.py +++ b/src/siphon/ncss.py @@ -49,7 +49,7 @@ class NCSS(HTTPEndPoint): """ # Need staticmethod to keep this from becoming a bound method, where self - # is passed implicitly + # is passed implicitly. Needed to avoid warning about duplicated docstring. unit_handler = staticmethod(lambda *a, **kw: default_unit_handler(*a, **kw)) def _get_metadata(self): diff --git a/tests/test_catalog.py b/tests/test_catalog.py index 93eb53291..4acf4b6dd 100644 --- a/tests/test_catalog.py +++ b/tests/test_catalog.py @@ -70,10 +70,7 @@ def test_virtual_access(): 'CONUS_20km/noaaport/catalog.xml') cat = TDSCatalog(url) # find the 2D time coordinate "full collection" dataset - for dataset in list(cat.datasets.values()): - if 'Full Collection' in dataset.name: - ds = dataset - break + ds = cat.datasets['Full Collection (Reference / Forecast Time) Dataset'] assert 'OPENDAP' in ds.access_urls # TwoD is a virtual dataset, so HTTPServer # should not be listed here @@ -128,8 +125,8 @@ def test_html_link(recwarn): """Test that we fall-back when given an HTML catalog page.""" url = ('http://thredds-test.unidata.ucar.edu/thredds/catalog/' 'grib/NCEP/RAP/CONUS_13km/catalog.html') - TDSCatalog(url) - assert 'Changing' in str(recwarn.pop(UserWarning).message) + with pytest.warns(UserWarning, match='Changing'): + TDSCatalog(url) @recorder.use_cassette('follow_cat')