mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 12:29:09 +00:00
Add tests for encoders
and some refactoring
This commit is contained in:
29
spotdl/lyrics/tests/test_lyric_base.py
Normal file
29
spotdl/lyrics/tests/test_lyric_base.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from spotdl.lyrics import LyricBase
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
class TestAbstractBaseClass:
|
||||
def test_error_abstract_base_class_lyricbase(self):
|
||||
artist = "awesome artist"
|
||||
track = "amazing track"
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
# This abstract base class must be inherited from
|
||||
# for instantiation
|
||||
LyricBase(artist, track)
|
||||
|
||||
|
||||
def test_inherit_abstract_base_class_encoderbase(self):
|
||||
class LyricKid(LyricBase):
|
||||
def __init__(self, artist, track):
|
||||
super().__init__(artist, track)
|
||||
|
||||
def get_lyrics(self):
|
||||
pass
|
||||
|
||||
|
||||
artist = "awesome artist"
|
||||
track = "amazing track"
|
||||
|
||||
LyricKid(artist, track)
|
||||
Reference in New Issue
Block a user