Skip to content

Commit d54186e

Browse files
committed
tests: Restore redundant
1 parent 383b06f commit d54186e

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

tests/test_dimension.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ def test_basic(self):
779779

780780
eqns = [Eq(u.forward, u + 1.), Eq(u2.forward, u2 + 1.), Eq(usave, u)]
781781
op = Operator(eqns)
782-
op.apply(time_M=nt-2)
782+
op.apply()
783783
assert np.all(np.allclose(u.data[(nt-1) % 3], nt-1))
784784
assert np.all([np.allclose(u2.data[i], i) for i in range(nt)])
785785
assert np.all([np.allclose(usave.data[i], i*factor)

tests/test_operator.py

-26
Original file line numberDiff line numberDiff line change
@@ -2019,29 +2019,3 @@ def test_indirection(self):
20192019
assert np.all(f.data[0] == 0.)
20202020
assert np.all(f.data[i] == 3. for i in range(1, 10))
20212021

2022-
def test_indirection_v2(self):
2023-
nt = 10
2024-
grid = Grid(shape=(4, 4))
2025-
time = grid.time_dim
2026-
x, y = grid.dimensions
2027-
2028-
f = TimeFunction(name='f', grid=grid, save=nt)
2029-
g = TimeFunction(name='g', grid=grid)
2030-
2031-
idx = time
2032-
s = Indirection(name='ofs0', mapped=idx)
2033-
2034-
eqns = [
2035-
Eq(s, idx),
2036-
Eq(f[s, x, y], g + 3.)
2037-
]
2038-
2039-
op = Operator(eqns)
2040-
2041-
assert op._dspace[time].lower == 0
2042-
assert op._dspace[time].upper == 0
2043-
assert op.arguments()['time_M'] == nt - 1
2044-
2045-
op.apply()
2046-
2047-
assert np.all(f.data[i] == 3. for i in range(1, 10))

0 commit comments

Comments
 (0)