diff --git a/tests/conftest.py b/tests/conftest.py index 37b48bc9..76ed3fad 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,7 +11,11 @@ def _has_soundcard(): def _has_daq(name=''): import ctypes - import PyDAQmx as daq + try: + import PyDAQmx as daq + except NotImplementedError: + # we are running on linux... + return False buff = ctypes.create_string_buffer(1024) # noinspection PyUnresolvedReferences diff --git a/tests/test_daq.py b/tests/test_daq.py index e683b944..2a5a683a 100644 --- a/tests/test_daq.py +++ b/tests/test_daq.py @@ -1,6 +1,5 @@ import pytest -from flyvr.audio.io_task import IOTask, DAQ_NUM_OUTPUT_SAMPLES, DAQ_NUM_OUTPUT_SAMPLES_PER_EVENT from flyvr.common import SharedState from flyvr.common.logger import DatasetLogServer from flyvr.audio.signal_producer import SampleChunk @@ -12,6 +11,8 @@ def test_io_a_output(tmpdir): import h5py + from flyvr.audio.io_task import IOTask, DAQ_NUM_OUTPUT_SAMPLES, DAQ_NUM_OUTPUT_SAMPLES_PER_EVENT + with DatasetLogServer() as log_server: shared_state = SharedState(None, logger=log_server.start_logging_server(tmpdir.join('test.h5').strpath))