Skip to content

Commit

Permalink
test error
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Oct 21, 2024
1 parent 703b55f commit 88068ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_internals/test_multiimagingextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ def test_get_video_single_frame(self):
assert_array_equal(test_frames, expected_frames)

def test_set_incorrect_times(self):
with self.assertRaisesWith(
exc_type=AssertionError,
exc_msg="'times' should have the same length of the number of frames!",
):
with self.assertRaises(ValueError) as cm:
self.multi_imaging_extractor.set_times(times=np.arange(0, 10) / 30.0)
self.assertEqual(
str(cm.exception),
"Mismatch between the number of frames and timestamps: 30 frames, but 10 timestamps provided. "
"Ensure the length of 'times' matches the number of frames.",
)

self.assertEqual(self.multi_imaging_extractor._times, None)

Expand Down

0 comments on commit 88068ac

Please sign in to comment.