예제 #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'<?')