def test_rangetype(config): p = XarrayProvider(config) rangetype = p.get_coverage_rangetype() assert isinstance(rangetype, dict) assert len(rangetype['field']) == 4 assert rangetype['field'][0]['name'] == 'analysed sea surface temperature'
def test_rangetype(config): p = XarrayProvider(config) rangetype = p.get_coverage_rangetype() assert isinstance(rangetype, dict) assert len(rangetype['field']) == 4 assert rangetype['field'][0]['name'] == 'SEA SURFACE TEMPERATURE'
def test_query(config): p = XarrayProvider(config) data = p.query() assert isinstance(data, dict) data = p.query(format_='zarr') assert isinstance(data, bytes)
def test_domainset(config): p = XarrayProvider(config) domainset = p.get_coverage_domainset() assert isinstance(domainset, dict) assert domainset['generalGrid']['axisLabels'] == ['lon', 'lat'] assert domainset['generalGrid']['gridLimits']['axisLabels'] == ['i', 'j'] assert domainset['generalGrid']['gridLimits']['axis'][0][ 'upperBound'] == 101 # noqa assert domainset['generalGrid']['gridLimits']['axis'][1][ 'upperBound'] == 101 # noqa
def test_domainset(config): p = XarrayProvider(config) domainset = p.get_coverage_domainset() assert isinstance(domainset, dict) assert domainset['generalGrid']['axisLabels'] == [ 'COADSX', 'COADSY', 'TIME' ] # noqa assert domainset['generalGrid']['gridLimits']['axisLabels'] == ['i', 'j'] assert domainset['generalGrid']['gridLimits']['axis'][0][ 'upperBound'] == 180 # noqa assert domainset['generalGrid']['gridLimits']['axis'][1][ 'upperBound'] == 90 # noqa
def test_query(config): p = XarrayProvider(config) data = p.query() assert isinstance(data, dict) data = p.query(format_='NetCDF') assert isinstance(data, bytes) data = p.query(datetime_='2000-01-16') assert isinstance(data, dict) data = p.query(datetime_='2000-01-16/2000-04-16') assert isinstance(data, dict) with pytest.raises(ProviderQueryError): data = p.query(datetime_='2010-01-16')
def test_provider(config): p = XarrayProvider(config) assert len(p.fields) == 4 assert len(p.axes) == 3 assert p.axes == ['lon', 'lat', 'time']
def test_provider(config): p = XarrayProvider(config) assert len(p.fields) == 4 assert len(p.axes) == 3 assert p.axes == ['COADSX', 'COADSY', 'TIME']
def test_query(config): p = XarrayProvider(config) data = p.query() assert isinstance(data, dict)