Skip to content

Commit

Permalink
Test dio timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Aug 20, 2023
1 parent 388b82b commit e8450e1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/spikegadgets_to_nwb/tests/test_convert_dios.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ def test_add_dios_single_rec():
]
# check that timeseries match
np.testing.assert_array_equal(current_dio.data[:], old_dio.data[:])
# np.testing.assert_array_equal(
# current_dio.timestamps, old_dio.timestamps
# )
assert np.allclose(
current_dio.timestamps[:],
old_dio.timestamps[:],
rtol=0,
atol=1.0 / 30000,
)
assert current_dio.unit == old_dio.unit
assert current_dio.description == old_dio.description

Expand Down Expand Up @@ -117,7 +120,12 @@ def test_add_dios_two_epoch():
]
# check that timeseries match
np.testing.assert_array_equal(current_dio.data, old_dio.data)
# np.testing.assert_array_equal(current_dio.timestamps, old_dio.timestamps) # TODO uncomment
assert np.allclose(
current_dio.timestamps[:],
old_dio.timestamps[:],
rtol=0,
atol=1.0 / 30000,
)
assert current_dio.unit == old_dio.unit
assert current_dio.description == old_dio.description

Expand Down

0 comments on commit e8450e1

Please sign in to comment.