Skip to content

Commit 62af630

Browse files
committed
The final noodle
1 parent 6759946 commit 62af630

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/test_dimension.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,15 +1502,15 @@ def test_stepping_dim_in_condition_lowering(self):
15021502
# is in the generated code, but indentation etc. seems to vary.
15031503
part1 = 'if (g[t0][x + 1][y + 1] <= 10)\n'
15041504
part2 = 'g[t1][x + 1][y + 1] = g[t0][x + 1][y + 1] + 1'
1505+
part2_alt = 'gL0(t1, x + 1, y + 1) = gL0(t0, x + 1, y + 1) + 1'
15051506
whole_code = str(op.ccode)
15061507

1507-
try:
1508-
loc = whole_code.find(part1)
1509-
assert loc != -1
1510-
loc = whole_code.find(part2, loc + len(part1))
1511-
assert loc != -1
1512-
except AssertionError as e:
1513-
raise AssertionError(whole_code) from e
1508+
loc = whole_code.find(part1)
1509+
assert loc != -1
1510+
loc = whole_code.find(part2, loc + len(part1))
1511+
# Try the alternative string
1512+
if loc == -1:
1513+
assert whole_code.find(part2_alt, loc + len(part1)) != -1
15141514

15151515
def test_expr_like_lowering(self):
15161516
"""

0 commit comments

Comments
 (0)