Skip to content

Commit

Permalink
Add test that would have previously failed
Browse files Browse the repository at this point in the history
  • Loading branch information
NoraLoose committed Nov 12, 2024
1 parent ab564d3 commit a375082
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import xarray as xr

from gcm_filters import Filter, FilterShape, GridType
from gcm_filters.filter import FilterSpec
from gcm_filters.filter import FilterSpec, _compute_n_steps_default


def _check_equal_filter_spec(spec1, spec2):
Expand Down Expand Up @@ -85,6 +85,13 @@ def test_filter_spec(filter_args, expected_filter_spec):
# TODO: check other properties of filter_spec?


def test_default_n_steps_larger_equal_3():
n_steps_default = _compute_n_steps_default(2, FilterShape.GAUSSIAN, 1.5, 1, np.pi)

# Assert that the number of steps is greater than or equal to 3
assert n_steps_default >= 3


#################### Diffusion-based filter tests ########################################
area_weighted_regular_grids = [
GridType.REGULAR_AREA_WEIGHTED,
Expand Down

0 comments on commit a375082

Please sign in to comment.