We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4b6a9e commit 2afd553Copy full SHA for 2afd553
climada/util/test/test_coordinates.py
@@ -659,6 +659,15 @@ def test_get_gridcellarea(self):
659
self.assertAlmostEqual(area2[0], 1781.5973363005)
660
self.assertTrue(area2[0] <= 2500)
661
662
+ with self.assertRaises(ValueError) as cm:
663
+ area_unknown_unit = u_coord.get_gridcellarea(
664
+ lat, resolution, unit="unknown"
665
+ )
666
+ self.assertIn(
667
+ f"'unknown' unit not recognized. Please use any of 'm2', 'km2' or 'ha'.",
668
+ str(cm.exception),
669
670
+
671
def test_read_vector_pass(self):
672
"""Test one columns data"""
673
shp_file = shapereader.natural_earth(
0 commit comments