Commit 67016f23 authored by Sævik Pål Næverlid's avatar Sævik Pål Næverlid
Browse files

Add working test

parent fb81094a
......@@ -877,3 +877,6 @@ def compute_w(pn, pm, u, v, z_w, z_r):
return wvel_pad[:]
def nearest_unmasked(mask, i, j):
return i, j
import numpy as np
from ladim_ibm.chemicals import gridforce
class Test_nearest_unmasked:
def test_correct_when_all_unmasked(self):
mask = np.zeros((4, 3))
i = np.array([1, 1, 2])
j = np.array([2, 3, 3])
ii, jj = gridforce.nearest_unmasked(mask, i, j)
assert ii.tolist() == i.tolist()
assert jj.tolist() == j.tolist()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment