Skip to content

Commit b55cd1a

Browse files
committed
noodling2
1 parent 5d233b3 commit b55cd1a

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

tests/test_caching.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def test_sparse_function(self, operate_on_empty_cache):
678678
ncreated = 2+1+2+2+2+1+4
679679
# Note that injection is now lazy so no new symbols should be created
680680
assert len(_SymbolCache) == cur_cache_size
681-
_ = i.evaluate
681+
# The expression is not redundant, but storing it changes the symbol count
682+
i.evaluate # noqa: B018
682683

683684
assert len(_SymbolCache) == cur_cache_size + ncreated
684685

tests/test_dimension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,8 @@ def test_stepping_dim_in_condition_lowering(self):
14921492
op.apply(time_M=threshold+3)
14931493
assert np.all(g.data[0, :, :] == threshold)
14941494
assert np.all(g.data[1, :, :] == threshold + 1)
1495-
assert 'if (g[t0][x + 1][y + 1] <= 10)\n' + \
1496-
'{\n g[t1][x + 1][y + 1] = g[t0][x + 1][y + 1] + 1' in str(op.ccode)
1495+
assert 'if (g[t0][x + 1][y + 1] <= 10)\n {' + \
1496+
'\n g[t1][x + 1][y + 1] = g[t0][x + 1][y + 1] + 1' in str(op.ccode)
14971497

14981498
def test_expr_like_lowering(self):
14991499
"""

tests/test_dle.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121

2222

2323
def get_blocksizes(op, opt, grid, blockshape, level=0):
24-
blocksizes = {f'{d}0_blk{level}_size': v
25-
for d, v in zip(grid.dimensions, blockshape, strict=True)}
24+
blocksizes = {
25+
f'{d}0_blk{level}_size': v
26+
for d, v in zip(grid.dimensions, blockshape, strict=False)
27+
}
2628
blocksizes = {k: v for k, v in blocksizes.items() if k in op._known_arguments}
2729
# Sanity check
2830
if grid.dim == 1 or len(blockshape) == 0:

0 commit comments

Comments
 (0)