Skip to content

Commit 31ec154

Browse files
committed
susbapce API test
1 parent 0a8b8a0 commit 31ec154

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cf/test/test_Field.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,6 +2749,14 @@ def test_Field_subspace(self):
27492749
h = f.subspace(grid_longitude=np.float64(20))
27502750
self.assertTrue(g.equals(h))
27512751

2752+
# Test API with 0/1/2 arguments
2753+
kwargs = {"grid_latitude": [1]}
2754+
i = f.subspace(**kwargs)
2755+
j = f.subspace(0, **kwargs)
2756+
k = f.subspace("compress", 0, **kwargs)
2757+
self.assertEqual(i, j)
2758+
self.assertEqual(i, k)
2759+
27522760
def test_Field_auxiliary_to_dimension_to_auxiliary(self):
27532761
f = cf.example_field(0)
27542762
nd = len(f.dimension_coordinates())

0 commit comments

Comments
 (0)