From f6f19153ade3aca693ff89402a4fd1ab040d2b23 Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Thu, 23 Jan 2020 11:45:07 +0100
Subject: [PATCH] correctly skip interpolation test without CUDA

---
 pystencils_tests/test_interpolation.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pystencils_tests/test_interpolation.py b/pystencils_tests/test_interpolation.py
index 497a60394..d32e347f6 100644
--- a/pystencils_tests/test_interpolation.py
+++ b/pystencils_tests/test_interpolation.py
@@ -155,6 +155,10 @@ def test_rotate_interpolation_gpu(dtype, address_mode, use_textures):
 def test_shift_interpolation_gpu(address_mode, dtype, use_textures):
     if int(sympy.__version__.replace('.', '')) < 12 and address_mode in ['mirror', 'warp']:
         pytest.skip()
+    pytest.importorskip('pycuda')
+
+    import pycuda.gpuarray as gpuarray
+    import pycuda.autoinit  # noqa
 
     rotation_angle = 0  # sympy.pi / 5
     scale = 1
-- 
GitLab