diff --git a/tests/shutdown.py b/tests/shutdown.py index d57e61f5a..b26d2e119 100644 --- a/tests/shutdown.py +++ b/tests/shutdown.py @@ -21,17 +21,13 @@ import logging -import numba import numpy as np import scipy -from numba import types import spead2 import spead2._spead2 import spead2.recv import spead2.send -from spead2.numba import intp_to_voidptr -from spead2.recv.numba import chunk_place_data def test_logging_shutdown(): @@ -66,6 +62,15 @@ def test_running_stream(): def test_running_chunk_stream_group(): + try: + import numba + except ImportError: + return # Skip the test if numba is not available + from numba import types + + from spead2.numba import intp_to_voidptr + from spead2.recv.numba import chunk_place_data + @numba.cfunc(types.void(types.CPointer(chunk_place_data), types.uintp), nopython=True) def place(data_ptr, data_size): data = numba.carray(data_ptr, 1)