exposures: don't do anything in check, update Tutorial #1002
GitHub Actions / Petals / Unit Test Results (3.10)
failed
Oct 4, 2024 in 0s
1 fail, 2 skipped, 200 pass in 4m 24s
Annotations
github-actions / Petals / Unit Test Results (3.10)
test_from_area_and_yield_nc4 (climada_petals.entity.exposures.test.test_crop_production.TestCropProduction) failed
climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: 'CropProduction' object has no attribute '_meta'
self = <climada_petals.entity.exposures.test.test_crop_production.TestCropProduction testMethod=test_from_area_and_yield_nc4>
def test_from_area_and_yield_nc4(self):
"""Test defining crop_production Exposure from area and yield
data extracted from netcdf test data for Switzerland"""
exp = cp.CropProduction.from_area_and_yield_nc4('whe', 2, 2,
FILENAME_YIELD, FILENAME_AREA,
'yield.tot', 'cultivated area all',
input_dir=INPUT_DIR)
self.assertEqual(exp.crop, 'whe')
self.assertEqual(exp.gdf.shape[0], 55)
> self.assertEqual(exp._meta['width'] * exp._meta['height'], 55)
E AttributeError: 'CropProduction' object has no attribute '_meta'
climada_petals/entity/exposures/test/test_crop_production.py:45: AttributeError
Loading