@@ -86,21 +86,23 @@ def test_return_type(self, grid_from_format):
8686
8787 # Basic validation
8888 assert isinstance (grid , ux .Grid )
89+
90+ def test_ugrid_compliance (self , grid_from_format ):
91+ """Test that grids from all formats meet basic UGRID standards."""
92+ grid = grid_from_format
93+
94+ # Basic topology and coordinate presence
8995 assert 'face_node_connectivity' in grid .connectivity
9096 assert 'node_lon' in grid .coordinates
9197 assert 'node_lat' in grid .coordinates
9298
93- # Check required dimensions
99+ # Required dimensions
94100 assert 'n_node' in grid .dims
95101 assert 'n_face' in grid .dims
96102
97- # Validate grid
103+ # Validate grid structure
98104 grid .validate ()
99105
100- def test_ugrid_compliance (self , grid_from_format ):
101- """Test that grids from all formats meet basic UGRID standards."""
102- grid = grid_from_format
103-
104106 # Check UGRID compliance
105107 # 1. Connectivity should use proper fill values
106108 assert grid .face_node_connectivity ._FillValue == INT_FILL_VALUE
@@ -120,8 +122,8 @@ def test_grid_properties_consistency(self, grid_from_format):
120122 grid = grid_from_format
121123
122124 # Check that all grids have the essential properties
123- assert hasattr ( grid , 'n_node' )
124- assert hasattr ( grid , 'n_face' )
125+ assert 'n_node' in grid . dims
126+ assert 'n_face' in grid . dims
125127 assert 'face_node_connectivity' in grid .connectivity
126128 assert 'node_lon' in grid .coordinates
127129 assert 'node_lat' in grid .coordinates
0 commit comments