From 4292d92aa1529b7550bc5becfa7657605e690204 Mon Sep 17 00:00:00 2001 From: kragent66-glitch Date: Sun, 23 Aug 2026 01:37:30 +0000 Subject: [PATCH] fix: use ffprobe_path() instead of hardcoded /usr/bin/ffprobe in test_video.py Fixes #115 Replaced the manual ffprobe resolution logic in _ffprobe_video_stream_fields() with a single call to ffprobe_path(), following the pattern from PR #110. - Added ffprobe_path to imports from hflow.ffmpeg - Removed hardcoded /usr/bin/ffprobe fallback - All 9 tests in test_video.py pass --- tests/test_video.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_video.py b/tests/test_video.py index 689f4f90..946c7cae 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -6,7 +6,7 @@ import pytest -from hflow.ffmpeg import ffmpeg_path +from hflow.ffmpeg import ffmpeg_path, ffprobe_path from hflow.video import ( AccessUnit, VideoEncodeError, @@ -151,9 +151,7 @@ def test_png_input_codec_upholds_guarantees(tmp_path: Path) -> None: def _ffprobe_video_stream_fields(mp4_path: Path) -> dict[str, str]: """Read codec/profile/decoded-frame-count fields from the first video stream.""" - ffprobe_binary = ffmpeg_path().with_name("ffprobe") - if not ffprobe_binary.is_file(): - ffprobe_binary = Path("/usr/bin/ffprobe") + ffprobe_binary = ffprobe_path() completed = subprocess.run( [ str(ffprobe_binary),