diff --git a/src/spikegadgets_to_nwb/tests/test_convert_ephys.py b/src/spikegadgets_to_nwb/tests/test_convert_ephys.py index 5cff829..1311702 100644 --- a/src/spikegadgets_to_nwb/tests/test_convert_ephys.py +++ b/src/spikegadgets_to_nwb/tests/test_convert_ephys.py @@ -94,7 +94,14 @@ def test_add_raw_ephys_single_rec(): ) == old_nwbfile.acquisition["e-series"].data[:, 0] ).all() - return read_nwbfile + # check that timestamps are less than one sample different + assert ( + ( + read_nwbfile.acquisition["e-series"].timestamps[:] + - read_nwbfile.acquisition["e-series"].timestamps[:] + ) + < 1 / 30000.0 + ).all() os.remove(filename) @@ -176,6 +183,14 @@ def test_add_raw_ephys_single_rec_probe_configuration(): ) == old_nwbfile.acquisition["e-series"].data[:, 0] ).all() + # check that timestamps are less than one sample different + assert ( + ( + read_nwbfile.acquisition["e-series"].timestamps[:] + - read_nwbfile.acquisition["e-series"].timestamps[:] + ) + < 1 / 30000.0 + ).all() os.remove(filename) @@ -270,5 +285,13 @@ def test_add_raw_ephys_two_epoch(): ) == old_nwbfile.acquisition["e-series"].data[:, 0] ).all() + # check that timestamps are less than one sample different + assert ( + ( + read_nwbfile.acquisition["e-series"].timestamps[:] + - read_nwbfile.acquisition["e-series"].timestamps[:] + ) + < 1 / 30000.0 + ).all() os.remove(filename)