Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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'))
Пример #12
0
def test_urlopen():
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    eq_(fobj.read(2), b'<?')
Пример #13
0
def test_urlopen():
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    assert fobj.read(2) == b'<?'
Пример #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'))
Пример #15
0
def get_header_remote():
    from siphon.http_util import urlopen
    return urlopen(get_test_latest_url('req=header'))
Пример #16
0
def get_header_remote():
    from siphon.http_util import urlopen
    return urlopen(get_test_latest_url('req=header'))
Пример #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'<?'
Пример #18
0
def test_urlopen():
    fobj = urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    eq_(fobj.read(2), b'<?')