From d69f5d116160d4152cf38095811ba25bb33e549f Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Thu, 23 Jan 2020 10:02:26 +0100 Subject: [PATCH] xfail and skip (due to old pytest version) --- pystencils_tests/test_interpolation.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pystencils_tests/test_interpolation.py b/pystencils_tests/test_interpolation.py index c821aa4bd..e70d9e1d6 100644 --- a/pystencils_tests/test_interpolation.py +++ b/pystencils_tests/test_interpolation.py @@ -11,11 +11,11 @@ import itertools from os.path import dirname, join import numpy as np -import pycuda.autoinit # NOQA -import pycuda.gpuarray as gpuarray import pytest import sympy +import pycuda.autoinit # NOQA +import pycuda.gpuarray as gpuarray import pystencils from pystencils.interpolation_astnodes import LinearInterpolator from pystencils.spatial_coordinates import x_, y_ @@ -143,10 +143,17 @@ def test_rotate_interpolation_gpu(dtype, address_mode, use_textures): f"out {address_mode} texture:{use_textures} {type_map[dtype]}") -@pytest.mark.parametrize('address_mode', ['border', 'wrap', 'clamp', 'mirror']) +@pytest.mark.parametrize('address_mode', ['border', 'wrap', + pytest.param('warp', marks=pytest.mark.xfail( + reason="% printed as fmod on old sympy")), + pytest.param('mirror', marks=pytest.mark.xfail( + reason="% printed as fmod on old sympy")), + ]) @pytest.mark.parametrize('dtype', [np.float64, np.float32, np.int32]) @pytest.mark.parametrize('use_textures', ('use_textures', False,)) def test_shift_interpolation_gpu(address_mode, dtype, use_textures): + if int(sympy.__version__.replace('.', '')) < 12 and address_mode in ['mirror', 'warp']: + pytest.skip() rotation_angle = 0 # sympy.pi / 5 scale = 1 -- GitLab