fremor.tests.test_cmor_tripolar module

tests for fremor.cmor_tripolar.load_tripolar_grid

class fremor.tests.test_cmor_tripolar.TestLoadTripolarGrid

Bases: object

Tests for load_tripolar_grid using mock statics and data files.

test_coordinates_written_into_ds(tmp_path, monkeypatch)

After calling load_tripolar_grid, ds should contain lat/lon and their bounds.

test_raises_file_not_found_when_no_statics(tmp_path, monkeypatch)

When neither the gold archive nor the FRE-bronx fallback can locate a statics file, load_tripolar_grid should raise FileNotFoundError.

test_raises_value_error_on_inconsistent_hq_dims(tmp_path, monkeypatch)

If the statics file’s q-point dimensions are not exactly hpoint+1, load_tripolar_grid should raise ValueError.

test_return_keys(tmp_path, monkeypatch)

The returned dict must contain exactly the eight expected coordinate keys.