diff --git a/pystencils_tests/test_interpolation.py b/pystencils_tests/test_interpolation.py
index 497a603945976b463d277302b04e462c6075b9b7..d32e347f67cdd8f265d856c3eafa2ff6f3cc575d 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