mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Add tests for encoders
and some refactoring
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from spotdl.encode import EncoderBase
|
||||
# from spotdl.encode import exceptions
|
||||
from spotdl.encode.exceptions import FFmpegNotFoundError
|
||||
from spotdl.encode.encoders import EncoderFFmpeg
|
||||
|
||||
import pytest
|
||||
@@ -9,6 +9,10 @@ class TestEncoderFFmpeg:
|
||||
def test_subclass(self):
|
||||
assert issubclass(EncoderFFmpeg, EncoderBase)
|
||||
|
||||
def test_ffmpeg_not_found_error(self):
|
||||
with pytest.raises(FFmpegNotFoundError):
|
||||
EncoderFFmpeg(encoder_path="/a/nonexistent/path")
|
||||
|
||||
|
||||
class TestEncodingDefaults:
|
||||
def m4a_to_mp3_encoder(input_file, output_file):
|
||||
|
||||
Reference in New Issue
Block a user