Merge branch 'feature/centroids_as_gdf' of github.com:CLIMADA-project… #211
This check has been archived and is scheduled for deletion.
Learn more about checks retention
GitHub Actions / Unit Test Results Python 3.11
failed
Dec 6, 2023 in 0s
2 fail, 628 pass in 6m 29s
Annotations
Check warning on line 0 in climada.hazard.centroids.test.test_vec_ras.TestRaster
github-actions / Unit Test Results Python 3.11
test_area_pass (climada.hazard.centroids.test.test_vec_ras.TestRaster) failed
tests_xml/tests.xml [took 0s]
Raw output
AssertionError: False is not true
self = <climada.hazard.centroids.test.test_vec_ras.TestRaster testMethod=test_area_pass>
def test_area_pass(self):
"""Test set_area"""
centr_ras = Centroids.from_raster_file(HAZ_DEMO_FL, window=Window(0, 0, 50, 60))
#centr_ras.meta['crs'] = {'proj': 'cea'}
area_pixel = centr_ras.get_area_pixel()
> self.assertTrue(
np.allclose(area_pixel,
np.ones(60 * 50) * 0.009000000000000341 * 0.009000000000000341))
E AssertionError: False is not true
climada/hazard/centroids/test/test_vec_ras.py:241: AssertionError
Check warning on line 0 in climada.hazard.centroids.test.test_vec_ras.TestRaster
github-actions / Unit Test Results Python 3.11
test_ne_crs_geom_pass (climada.hazard.centroids.test.test_vec_ras.TestRaster) failed
tests_xml/tests.xml [took 0s]
Raw output
AssertionError: 4.51063496489 != -69.3326495969998 within 7 places (73.8432845618898 difference)
self = <climada.hazard.centroids.test.test_vec_ras.TestRaster testMethod=test_ne_crs_geom_pass>
def test_ne_crs_geom_pass(self):
"""Test _ne_crs_geom"""
centr_ras = Centroids.from_raster_file(HAZ_DEMO_FL, window=Window(0, 0, 50, 60))
xy_vec = centr_ras._ne_crs_geom()
x_vec, y_vec = xy_vec.geometry[:].x.values, xy_vec.geometry[:].y.values
> self.assertAlmostEqual(4.51063496489, x_vec[0])
E AssertionError: 4.51063496489 != -69.3326495969998 within 7 places (73.8432845618898 difference)
climada/hazard/centroids/test/test_vec_ras.py:202: AssertionError
Loading