MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / test_seek_invalid

Method test_seek_invalid

tests/test_video_stream.py:325–335  ·  view source on GitHub ↗

Test `seek()` throws correct exception when specifying in invalid seek value.

(
        self, vs_type: ty.Callable[..., VideoStream], test_video: VideoParameters
    )

Source from the content-addressed store, hash-verified

323 assert stream.frame_number == test_video.total_frames
324
325 def test_seek_invalid(
326 self, vs_type: ty.Callable[..., VideoStream], test_video: VideoParameters
327 ):
328 """Test `seek()` throws correct exception when specifying in invalid seek value."""
329 stream = vs_type(test_video.path)
330
331 with pytest.raises(ValueError):
332 stream.seek(-1)
333
334 with pytest.raises(ValueError):
335 stream.seek(-0.1)
336
337
338#

Callers

nothing calls this directly

Calls 1

seekMethod · 0.45

Tested by

no test coverage detected