def test_dataset_parsing_tds5(recwarn): """Test parsing the dataset from TDS 5.""" url = ('http://thredds-test.unidata.ucar.edu/thredds/ncss/grid/casestudies/irma/model/' 'gfs/GFS_Global_0p5deg_20170903_1200.grib2/dataset.xml') element = ET.fromstring(urlopen(url).read()) NCSSDataset(element) assert len(recwarn) == 0
def test_full_ncss_grid(self): url = ('http://thredds.ucar.edu/thredds/ncss/grib/NCEP/GFS/' 'Global_0p5deg/GFS_Global_0p5deg_20150602_0000.grib2/' 'dataset.xml') element = ET.fromstring(urlopen(url).read()) parsed = NCSSDataset(element) assert parsed
def test_dataset_elements_full_ncss_station(): """Test parsing the dataset from a full ncss station page.""" url = ('http://thredds.ucar.edu/thredds/ncss/nws/synoptic/' 'ncdecoded/Surface_Synoptic_Point_Data_fc.cdmr/dataset.xml') element = ET.fromstring(urlopen(url).read()) parsed = NCSSDataset(element) assert parsed
def test_dataset_elements_full_ncss_grid(): """Test parsing the dataset from a full ncss grid page.""" url = ('http://thredds.ucar.edu/thredds/ncss/grib/NCEP/GFS/' 'Global_0p5deg/GFS_Global_0p5deg_20150602_0000.grib2/' 'dataset.xml') element = ET.fromstring(urlopen(url).read()) parsed = NCSSDataset(element) assert parsed
def test_dataset_parsing_tds5(recwarn): """Test parsing the dataset from TDS 5.""" url = ( 'http://thredds-test.unidata.ucar.edu/thredds/ncss/grid/casestudies/irma/model/' 'gfs/GFS_Global_0p5deg_20170903_1200.grib2/dataset.xml') element = ET.fromstring(urlopen(url).read()) NCSSDataset(element) assert len(recwarn) == 0
def test_full_ncss_station(self): url = ('http://thredds.ucar.edu/thredds/ncss/nws/synoptic/' 'ncdecoded/Surface_Synoptic_Point_Data_fc.cdmr/dataset.xml') element = ET.fromstring(urlopen(url).read()) parsed = NCSSDataset(element) assert parsed
def get_header_remote(): 'Get a header from a remote data source' from siphon.http_util import urlopen return urlopen(get_test_latest_url('req=header'))
def test_urlopen(): fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml') eq_(fobj.read(2), b'<?')
def test_urlopen(): fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml') assert fobj.read(2) == b'<?'
def get_header_remote(): from siphon.http_util import urlopen return urlopen(get_test_latest_url('req=header'))
def test_urlopen(): """Test siphon's urlopen wrapper.""" fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml') assert fobj.read(2) == b'<?'