Skip to content

exposures: don't do anything in check, update Tutorial

Sign in for the full log view
GitHub Actions / Petals / Unit Test Results (3.10) failed Oct 4, 2024 in 0s

1 fail, 2 skipped, 200 pass in 4m 24s

203 tests  ±0   200 ✅  - 1   4m 24s ⏱️ -39s
  1 suites ±0     2 💤 ±0 
  1 files   ±0     1 ❌ +1 

Results for commit e1800f5. ± Comparison against earlier commit c15ec0d.

Annotations

Check warning on line 0 in climada_petals.entity.exposures.test.test_crop_production.TestCropProduction

See this annotation in the file changed.

@github-actions 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