diff --git a/devito/ir/equations/algorithms.py b/devito/ir/equations/algorithms.py index 8913f81dde..e0281e1139 100644 --- a/devito/ir/equations/algorithms.py +++ b/devito/ir/equations/algorithms.py @@ -229,7 +229,7 @@ def _(d, mapper, rebuilt, sregistry): return tkns = tuple(t._rebuild(name=sregistry.make_name(prefix=t.name)) for t in d.tkns) - mapper.update({t0: t1 for t0, t1 in zip(d.tkns, tkns)}) + mapper.update({tkn0: tkn1 for tkn0, tkn1 in zip(d.tkns, tkns)}) mapper[d] = d._rebuild(thickness=tkns) diff --git a/tests/test_dle.py b/tests/test_dle.py index 45583d4346..7f1ae73186 100644 --- a/tests/test_dle.py +++ b/tests/test_dle.py @@ -146,7 +146,7 @@ def test_cache_blocking_structure_subdims(): # zi is rebuilt with name z, so check symbolic max and min are preserved # Also check the zi was rebuilt assert not tree[4].dim.is_Block and tree[4].dim is not zi and\ - str(tree[4].dim.symbolic_min) == 'z_ltkn0 + z_m' and\ + str(tree[4].dim.symbolic_min) == 'z_m + z_ltkn0' and\ str(tree[4].dim.symbolic_max) == 'z_M - z_rtkn0' and\ tree[4].dim.parent is z @@ -1374,7 +1374,7 @@ def test_nested_cache_blocking_structure_subdims(self, blocklevels): if blocklevels == 1: assert not tree[4].dim.is_Block and tree[4].dim is not zi and\ - str(tree[4].dim.symbolic_min) == 'z_ltkn0 + z_m' and\ + str(tree[4].dim.symbolic_min) == 'z_m + z_ltkn0' and\ str(tree[4].dim.symbolic_max) == 'z_M - z_rtkn0' and\ tree[4].dim.parent is z elif blocklevels == 2: @@ -1385,7 +1385,7 @@ def test_nested_cache_blocking_structure_subdims(self, blocklevels): assert tree[5].dim.is_Block and tree[5].dim.parent is tree[3].dim and\ tree[5].dim.root is y assert not tree[6].dim.is_Block and tree[6].dim is not zi and\ - str(tree[6].dim.symbolic_min) == 'z_ltkn0 + z_m' and\ + str(tree[6].dim.symbolic_min) == 'z_m + z_ltkn0' and\ str(tree[6].dim.symbolic_max) == 'z_M - z_rtkn0' and\ tree[6].dim.parent is z diff --git a/tests/test_symbolic_coefficients.py b/tests/test_symbolic_coefficients.py index 30a89b155b..00dd80c765 100644 --- a/tests/test_symbolic_coefficients.py +++ b/tests/test_symbolic_coefficients.py @@ -200,8 +200,8 @@ def test_staggered_equation(self): eq_f = Eq(f, f.dx2(weights=weights)) - expected = 'Eq(f(x + h_x/2), 1.0*f(x - h_x/2) - 2.0*f(x + h_x/2)'\ - ' + 1.0*f(x + 3*h_x/2))' + expected = 'Eq(f(x + h_x/2), f(x - h_x/2) - 2.0*f(x + h_x/2)'\ + ' + f(x + 3*h_x/2))' assert(str(eq_f.evaluate) == expected) @pytest.mark.parametrize('stagger', [True, False])