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 9205a19 commit b4b6a9eCopy full SHA for b4b6a9e
climada/util/test/test_coordinates.py
@@ -285,6 +285,17 @@ def test_get_unit_invalid_crs(self):
285
unit, "US survey foot", "Expected unit 'US survey foot' for projected CRS."
286
)
287
288
+ def test_get_unit_crs_undefined(self):
289
+ """Test with an undefined CRS."""
290
+ crs = None
291
+ gdf = self.create_mock_gdf(crs)
292
+ with self.assertLogs("climada.util.coordinates", level="WARNING") as cm:
293
+ unit = u_coord.get_crs_unit(gdf.crs)
294
+ self.assertIn("The units of the input crs are undefined.", cm.output[0])
295
+ self.assertEqual(
296
+ unit, "undefined", "Expected unit 'undefined' for projected CRS."
297
+ )
298
+
299
300
class TestDistance(unittest.TestCase):
301
"""Test distance functions."""
0 commit comments