test(music): skip an FFmpeg test when the FFmpeg build has no encoder for its input

This commit is contained in:
imSp4rky
2026-11-29 12:20:56 -07:00
parent 59586e60d4
commit 90dfe1c7bd
2 changed files with 15 additions and 11 deletions
+3 -4
View File
@@ -17,7 +17,7 @@ from pathlib import Path
import mutagen
import pytest
from tests.core.test_music_tagger_roundtrip import make_song
from tests.core.test_music_tagger_roundtrip import ffmpeg, make_song
from unshackle.core import binaries
from unshackle.core.music.tagger import write_music_metadata
from unshackle.core.tracks import Audio
@@ -26,7 +26,7 @@ pytestmark = pytest.mark.skipif(shutil.which("ffmpeg") is None, reason="requires
def encode(path: Path, encoder: str, *extra_args: str) -> Path:
subprocess.run(
ffmpeg(
[
"ffmpeg",
"-nostdin",
@@ -46,8 +46,7 @@ def encode(path: Path, encoder: str, *extra_args: str) -> Path:
"-2", # flac and opus in mp4 are flagged experimental by the muxer
*extra_args,
str(path),
],
check=True,
]
)
return path