Skip to content

Commit

Permalink
Make numba optional in shutdown tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed Aug 17, 2023
1 parent dd67984 commit b4b5db3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b4b5db3

Please sign in to comment.