[Bug]: Tests create a TimeSeries with a zero rate which is no longer allowed #421
Closed
3 tasks done
Labels
category: bug
errors in the code or code behavior
What happened?
This PR NeurodataWithoutBorders/pynwb#1793 was recently merged into PyNWB. An error is now raised when a TimeSeries is created with a rate <= 0. The nwbinspector tests try to create such a TimeSeries and fail as a result.
https://github.com/NeurodataWithoutBorders/nwbinspector/blob/dev/tests/unit_tests/test_time_series.py#L208-L222
I think the first test should stay because old files may have a TimeSeries with a non-positive rate, but the test should be updated to create such a TimeSeries like so:
https://github.com/NeurodataWithoutBorders/pynwb/blob/0e45cd927a0734428358eab10a75672e8dd75344/tests/unit/test_base.py#L414-L428
I do not understand the need for the second test above -- how often is a TimeSeries created with a single data point? That seems like an incorrect use of a TimeSeries and could be its own separate check, regardless of the rate specified.
Operating System
M1 macOS
Python Version
3.11
Were you streaming with ROS3?
None
Package Versions
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: