From 2438d74fad70b27254edaeecef9a6cbc13906e40 Mon Sep 17 00:00:00 2001 From: Julian Hammer Date: Thu, 17 Feb 2022 13:17:34 +0100 Subject: [PATCH] fixed sympy tests --- tests/test_layer_condition.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_layer_condition.py b/tests/test_layer_condition.py index 306173d..3175cf2 100644 --- a/tests/test_layer_condition.py +++ b/tests/test_layer_condition.py @@ -13,6 +13,7 @@ from sympy import oo from kerncraft import kerncraft as kc +from kerncraft.kernel import symbol_pos_int from kerncraft.prefixedunit import PrefixedUnit @@ -66,7 +67,7 @@ def test_3d_7pt(self): with open(store_file, 'rb') as f: results = pickle.load(f) result = next(iter(results.values())) - N, M, i, j, k = sympy.var('N, M, i, j, k') + N, M, i, j, k = [symbol_pos_int(c) for c in 'NMijk'] result_expected = {'accesses': {'a': [(k - 1, j, i), (k, j - 1, i), @@ -167,7 +168,7 @@ def test_constantdim(self): results = pickle.load(f) result = next(iter(results.values())) - N, M, j, i = sympy.var('N'), sympy.var('M'), sympy.var('j'), sympy.var('i') + N, M, j, i = [symbol_pos_int(c) for c in 'NMji'] result_expected = \ {'accesses': {'W': [(0, j, i), (1, j, i)], 'a': [(j - 1, i), (j, i - 1), (j, i), (j, i + 1), (j + 1, i)],