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

Function test_video_stream_pyav_bytesio

tests/test_backend_pyav.py:23–31  ·  view source on GitHub ↗

Test that VideoStreamAv works with a BytesIO input in addition to a path.

(test_video_file: str)

Source from the content-addressed store, hash-verified

21
22
23def test_video_stream_pyav_bytesio(test_video_file: str):
24 """Test that VideoStreamAv works with a BytesIO input in addition to a path."""
25 # Mode must be binary!
26 with open(test_video_file, mode="rb") as video_file:
27 stream = VideoStreamAv(path_or_io=video_file, threading_mode=None)
28 assert stream.is_seekable
29 stream.seek(50)
30 for _ in range(10):
31 assert stream.read() is not False

Callers

nothing calls this directly

Calls 3

seekMethod · 0.95
readMethod · 0.95
VideoStreamAvClass · 0.90

Tested by

no test coverage detected