Skip to content

Commit cddd39f

Browse files
Added a basic unit test for checking shocsimple.topology does not raise and error when there is a missing variable standard name.
1 parent faa721a commit cddd39f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/conventions/test_cfgrid2d.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ def test_values() -> None:
479479
# The values should be in a specific order
480480
assert numpy.allclose(values, eta.values.ravel(), equal_nan=True)
481481

482+
def test_topology_with_missing_variable_standard_name() -> None:
483+
# Basic test showing no error when variable has no standard name
484+
dataset = make_dataset(j_size=10, i_size=20, corner_size=5, time_size=3)
485+
del dataset['botz'].attrs['standard_name']
486+
dataset.ems.topology
482487

483488
@pytest.mark.matplotlib
484489
def test_plot_on_figure() -> None:

0 commit comments

Comments
 (0)