# Copyright (c) 2013-2015 Unidata. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT import logging import warnings from siphon.testing import get_recorder from siphon.catalog import TDSCatalog, get_latest_access_url log = logging.getLogger("siphon.catalog") log.setLevel(logging.WARNING) log.addHandler(logging.StreamHandler()) recorder = get_recorder(__file__) @recorder.use_cassette('thredds-test-toplevel-catalog') def test_basic(): 'Basic test of catalog parsing' url = 'http://thredds-test.unidata.ucar.edu/thredds/catalog.xml' cat = TDSCatalog(url) assert 'Forecast Model Data' in cat.catalog_refs @recorder.use_cassette('thredds-test-latest-gfs-0p5') def test_access(): 'Test catalog parsing of access methods' url = ('http://thredds-test.unidata.ucar.edu/thredds/catalog/grib/' 'NCEP/GFS/Global_0p5deg/latest.xml') cat = TDSCatalog(url)
# Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT import logging import xml.etree.ElementTree as ET from nose.tools import assert_dict_equal, assert_equal from siphon.ncss_dataset import NCSSDataset, _Types from siphon.testing import get_recorder from siphon.http_util import urlopen log = logging.getLogger("siphon.ncss_dataset") log.setLevel(logging.WARNING) log.addHandler(logging.StreamHandler()) recorder = get_recorder(__file__) # # tested: # # attribute # values # projectionBox # axisRef # coordTransRef # grid # parameter # featureType # variable # # projectionBox