Skip to content

Commit 0698917

Browse files
committed
test: adjust legacy test for symbolic coeffs
1 parent 8bc2087 commit 0698917

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_unexpansion.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_numeric_coeffs(self):
5151
Operator(Eq(u, (v*u.dx).dy(weights=w)), opt=opt).cfunction
5252

5353
@pytest.mark.parametrize('coeffs,expected', [
54-
((7, 7, 7), 1), # We've had a bug triggered by identical coeffs
54+
((7, 7, 7), 3), # We've had a bug triggered by identical coeffs
5555
((5, 7, 9), 3),
5656
])
5757
def test_multiple_cross_derivs(self, coeffs, expected):
@@ -89,7 +89,8 @@ def test_legacy_api(self, order, nweight):
8989
coefficients='symbolic')
9090

9191
w0 = np.arange(so + 1 + nweight) + 1
92-
wstr = '{' + ', '.join([f"{w:1.1f}F" for w in w0]) + '}'
92+
s = f'({x.spacing}*{x.spacing})' if order == 2 else f'{x.spacing}'
93+
wstr = f'{{{w0[0]:1.1f}F/{s},'
9394
wdef = f'[{so + 1 + nweight}] __attribute__ ((aligned (64)))'
9495

9596
coeffs_x_p1 = Coefficient(order, u, x, w0)

0 commit comments

Comments
 (0)