Skip to content

Commit e19765e

Browse files
committed
tests: update test with xderiv change
1 parent 525a6f0 commit e19765e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tests/test_derivatives.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ def test_stencil_derivative(self, SymbolType, dim):
8787

8888
@pytest.mark.parametrize('SymbolType, derivative, dim, expected', [
8989
(Function, ['dx2'], 3, 'Derivative(u(x, y, z), (x, 2))'),
90-
(Function, ['dx2dy'], 3, 'Derivative(Derivative(u(x, y, z), (x, 2)), y)'),
90+
(Function, ['dx2dy'], 3, 'Derivative(u(x, y, z), (x, 2), y)'),
9191
(Function, ['dx2dydz'], 3,
92-
'Derivative(Derivative(Derivative(u(x, y, z), (x, 2)), y), z)'),
92+
'Derivative(u(x, y, z), (x, 2), y, z)'),
9393
(Function, ['dx2', 'dy'], 3, 'Derivative(Derivative(u(x, y, z), (x, 2)), y)'),
9494
(Function, ['dx2dy', 'dz2'], 3,
95-
'Derivative(Derivative(Derivative(u(x, y, z), (x, 2)), y), (z, 2))'),
95+
'Derivative(Derivative(u(x, y, z), (x, 2), y), (z, 2))'),
9696
(TimeFunction, ['dx2'], 3, 'Derivative(u(t, x, y, z), (x, 2))'),
97-
(TimeFunction, ['dx2dy'], 3, 'Derivative(Derivative(u(t, x, y, z), (x, 2)), y)'),
97+
(TimeFunction, ['dx2dy'], 3, 'Derivative(u(t, x, y, z), (x, 2), y)'),
9898
(TimeFunction, ['dx2', 'dy'], 3,
9999
'Derivative(Derivative(u(t, x, y, z), (x, 2)), y)'),
100100
(TimeFunction, ['dx', 'dy', 'dx2', 'dz', 'dydz'], 3,
101-
'Derivative(Derivative(Derivative(Derivative(Derivative(Derivative(' +
102-
'u(t, x, y, z), x), y), (x, 2)), z), y), z)')
101+
'Derivative(Derivative(Derivative(Derivative(Derivative(' +
102+
'u(t, x, y, z), x), y), (x, 2)), z), y, z)')
103103
])
104104
def test_unevaluation(self, SymbolType, derivative, dim, expected):
105105
u = SymbolType(name='u', grid=self.grid, time_order=2, space_order=2)
@@ -112,13 +112,13 @@ def test_unevaluation(self, SymbolType, derivative, dim, expected):
112112

113113
@pytest.mark.parametrize('expr,expected', [
114114
('u.dx + u.dy', 'Derivative(u, x) + Derivative(u, y)'),
115-
('u.dxdy', 'Derivative(Derivative(u, x), y)'),
115+
('u.dxdy', 'Derivative(u, x, y)'),
116116
('u.laplace',
117117
'Derivative(u, (x, 2)) + Derivative(u, (y, 2)) + Derivative(u, (z, 2))'),
118118
('(u.dx + u.dy).dx', 'Derivative(Derivative(u, x) + Derivative(u, y), x)'),
119119
('((u.dx + u.dy).dx + u.dxdy).dx',
120120
'Derivative(Derivative(Derivative(u, x) + Derivative(u, y), x) +' +
121-
' Derivative(Derivative(u, x), y), x)'),
121+
' Derivative(u, x, y), x)'),
122122
('(u**4).dx', 'Derivative(u**4, x)'),
123123
('(u/4).dx', 'Derivative(u/4, x)'),
124124
('((u.dx + v.dy).dx * v.dx).dy.dz',
@@ -741,7 +741,7 @@ def test_cross_newnest(self):
741741
grid = Grid((11, 11))
742742
f = Function(name="f", grid=grid, space_order=2)
743743

744-
assert f.dxdy == f.dx.dy
744+
assert simplify((f.dxdy - f.dx.dy).evaluate) == 0
745745

746746
def test_nested_call(self):
747747
grid = Grid((11, 11))

0 commit comments

Comments
 (0)