Skip to content

Merge branch 'develop' into feature/exposures_crs #928

Merge branch 'develop' into feature/exposures_crs

Merge branch 'develop' into feature/exposures_crs #928

GitHub Actions / Core / Unit Test Results (3.10) failed Aug 23, 2024 in 0s

1 fail, 696 pass in 9m 38s

697 tests  ±0   696 ✅ ±0   9m 38s ⏱️ +50s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     1 ❌ ±0 

Results for commit 06ef584. ± Comparison against earlier commit 91f56eb.

Annotations

Check warning on line 0 in climada.util.calibrate.test.test_base.TestInputPostInit

See this annotation in the file changed.

@github-actions github-actions / Core / Unit Test Results (3.10)

test_post_init_calls (climada.util.calibrate.test.test_base.TestInputPostInit) failed

tests_xml/tests.xml [took 0s]
Raw output
ValueError: zero-size array to reduction operation minimum which has no identity
self = <climada.util.calibrate.test.test_base.TestInputPostInit testMethod=test_post_init_calls>

    def test_post_init_calls(self):
        """Test if post_init calls stuff correctly using mocks"""
        # Create mocks
>       exposure_mock = create_autospec(Exposures())

climada/util/calibrate/test/test_base.py:93: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../micromamba/envs/climada_env_3.10/lib/python3.10/unittest/mock.py:2717: in create_autospec
    mock = Klass(parent=_parent, _new_parent=_parent, _new_name=_new_name,
../../../micromamba/envs/climada_env_3.10/lib/python3.10/unittest/mock.py:2111: in __init__
    _safe_super(MagicMixin, self).__init__(*args, **kw)
../../../micromamba/envs/climada_env_3.10/lib/python3.10/unittest/mock.py:450: in __init__
    self._mock_add_spec(spec, spec_set, _spec_as_instance, _eat_self)
../../../micromamba/envs/climada_env_3.10/lib/python3.10/unittest/mock.py:505: in _mock_add_spec
    if iscoroutinefunction(getattr(spec, attr, None)):
climada/entity/exposures/base.py:257: in _meta
    _r, meta = u_coord.points_to_raster(self.data)
climada/util/coordinates.py:2415: in points_to_raster
    res = np.abs(get_resolution(latval, lonval)).min()
climada/util/coordinates.py:1634: in get_resolution
    return tuple([get_resolution_1d(c, min_resol=min_resol) for c in coords])
climada/util/coordinates.py:1634: in <listcomp>
    return tuple([get_resolution_1d(c, min_resol=min_resol) for c in coords])
climada/util/coordinates.py:1616: in get_resolution_1d
    return diff[np.abs(diff) == res[mask].min()][0]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = array([], dtype=float64), axis = None, out = None, keepdims = False
initial = <no value>, where = True

    def _amin(a, axis=None, out=None, keepdims=False,
              initial=_NoValue, where=True):
>       return umr_minimum(a, axis, None, out, keepdims, initial, where)
E       ValueError: zero-size array to reduction operation minimum which has no identity

../../../micromamba/envs/climada_env_3.10/lib/python3.10/site-packages/numpy/core/_methods.py:45: ValueError