def test_get_depth_grid(mocker, bathygrid): # Mock the variables class variables = mocker.Mock() variables.bathygrid = bathygrid variables.wlevmax = 0. point = (19, 20) indexes = [6, 8, 16, 18] test = Loads(variables) result = test._get_depth(point, indexes) assert np.isclose(result, -29)
def test_get_depth(mocker, bathygrid): # Mock the variables class variables = mocker.Mock() variables.bathygrid = bathygrid variables.wlevmax = 0. point = (21, 21) indexes = [12, 13, 17, 18] test = Loads(variables) result = test._get_depth(point, indexes) assert np.isclose(result, -31)