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 c9bcf73 commit 3c2802fCopy full SHA for 3c2802f
cf/test/test_weights.py
@@ -326,6 +326,16 @@ def test_weights_cell_measures_coordinates(self):
326
with self.assertRaises(ValueError):
327
w = f.weights("area", cell_measures=False, coordinates=False)
328
329
+ def test_weights_exceptions(self):
330
+ f = cf.example_field(0)
331
+ f.coordinate("X").del_bounds()
332
+ f.coordinate("Y").del_bounds()
333
+
334
+ with self.assertRaisesRegex(
335
+ ValueError, "Can't create weights: Unable to find cell areas"
336
+ ):
337
+ f.weights("area")
338
339
340
if __name__ == "__main__":
341
print("Run date:", datetime.datetime.now())
0 commit comments