Refactor exceptions

* Suffix names for custom exceptions with "Error"
* Introduce exceptions for when the coressponding encoder isn't found
This commit is contained in:
Ritiek Malhotra
2020-03-17 03:09:56 +05:30
parent 083c430489
commit 29005f24ed
16 changed files with 276 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
from spotdl.encode import EncoderBase
import pytest
def test_abstract_base_class_encoderbase():
encoder_path = "ffmpeg"
_loglevel = "-hide_banner -nostats -v panic"
_additional_arguments = ["-b:a", "192k", "-vn"]
with pytest.raises(TypeError):
# This abstract base class must be inherited from
# for instantiation
EncoderBase(encoder_path, _loglevel, _additional_arguments)