Esempio n. 1
0
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
Esempio n. 2
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
Esempio n. 3
0
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
Esempio n. 4
0
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
Esempio n. 5
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
Esempio n. 6
0
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
Esempio n. 7
0
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
Esempio n. 8
0
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
Esempio n. 9
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
Esempio n. 10
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
Esempio n. 11
0
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'))
Esempio n. 12
0
def test_urlopen():
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    eq_(fobj.read(2), b'<?')
Esempio n. 13
0
def test_urlopen():
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    assert fobj.read(2) == b'<?'
Esempio n. 14
0
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'))
Esempio n. 15
0
def get_header_remote():
    from siphon.http_util import urlopen
    return urlopen(get_test_latest_url('req=header'))
Esempio n. 16
0
def get_header_remote():
    from siphon.http_util import urlopen
    return urlopen(get_test_latest_url('req=header'))
Esempio n. 17
0
def test_urlopen():
    """Test siphon's urlopen wrapper."""
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    assert fobj.read(2) == b'<?'
Esempio n. 18
0
def test_urlopen():
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    eq_(fobj.read(2), b'<?')