Revert "Update CHANGELOG.md" #964
GitHub Actions / Core / Unit Test Results (3.9)
failed
Sep 17, 2024 in 0s
1 fail, 697 pass in 8m 47s
Annotations
Check warning on line 0 in climada.engine.test.test_impact_calc.TestImpactCalc
github-actions / Core / Unit Test Results (3.9)
test_calc_impact_RF_pass (climada.engine.test.test_impact_calc.TestImpactCalc) failed
tests_xml/tests.xml [took 1s]
Raw output
climada.util.api_client.Client.NoConnection: there is no internet connection and the client has not found any cached result for this request.
self = <climada.engine.test.test_impact_calc.TestImpactCalc testMethod=test_calc_impact_RF_pass>
def test_calc_impact_RF_pass(self):
> haz = Hazard.from_hdf5(get_test_file('test_hazard_US_flood_random_locations'))
climada/engine/test/test_impact_calc.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
climada/test/__init__.py:50: in get_test_file
client.list_dataset_infos(name=ds_name, status='test_dataset', version='ANY'),
climada/util/api_client.py:418: in list_dataset_infos
DatasetInfo.from_json(ds) for ds in self._request_200(url, params=params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <climada.util.api_client.Client object at 0x7f5802d44fd0>
url = 'https://climada.ethz.ch/data-api/v2/dataset/'
params = {'data_type': None, 'limit': 100000, 'name': 'test_hazard_US_flood_random_locations', 'status': 'test_dataset', ...}
def _request_200(self, url, params=None):
"""Helper method, triaging successfull and failing requests.
Returns
-------
dict
loaded from the json object of a successful request.
Raises
------
NoResult
if the response status code is different from 200
"""
# pylint: disable=no-else-return
if params is None:
params = dict()
if self.online:
page = requests.get(url, params=params, timeout=Client.QUERY_TIMEOUT)
if page.status_code != 200:
raise Client.NoResult(page.content.decode())
result = json.loads(page.content.decode())
if self.cache.enabled:
self.cache.store(result, url, **params)
return result
else: # try to restore previous results from an identical request
if not self.cache.enabled:
raise Client.NoConnection(
"there is no internet connection and the client does"
" not cache results."
)
cached_result = self.cache.fetch(url, **params)
if not cached_result:
> raise Client.NoConnection(
"there is no internet connection and the client has not"
" found any cached result for this request."
)
E climada.util.api_client.Client.NoConnection: there is no internet connection and the client has not found any cached result for this request.
climada/util/api_client.py:341: NoConnection
Loading