File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2594,7 +2594,19 @@ def test_Field_del_construct(self):
2594
2594
f .del_construct ("measure:area" ), cf .CellMeasure
2595
2595
)
2596
2596
2597
- # TODO test cyclic nature
2597
+ # Test a field with cyclic axes, to ensure the cyclic() set is
2598
+ # updated accordingly if a cyclic axes is the one removed.
2599
+ g = cf .example_field (2 ) # this has a cyclic axes 'domainaxis2'
2600
+ # To delete a cyclic axes, must first delete this dimension coordinate
2601
+ # because 'domainaxis2' spans it.
2602
+ self .assertIsInstance (
2603
+ g .del_construct ("dimensioncoordinate2" ), cf .DimensionCoordinate
2604
+ )
2605
+ self .assertEqual (g .cyclic (), set (("domainaxis2" ,)))
2606
+ self .assertIsInstance (
2607
+ g .del_construct ("domainaxis2" ), cf .DomainAxis
2608
+ )
2609
+ self .assertEqual (g .cyclic (), set ())
2598
2610
2599
2611
def test_Field_persist (self ):
2600
2612
"""Test the `persist` Field method."""
You can’t perform that action at this time.
0 commit comments