mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-29 20:45:11 +00:00
test(music): skip an FFmpeg test when the FFmpeg build has no encoder for its input
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user