mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-19 09:45:47 -04:00
Update
This commit is contained in:
parent
7cbd77edc5
commit
837e934476
31 changed files with 990 additions and 172 deletions
30
tests/test_track.py
Normal file
30
tests/test_track.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
from util import arun
|
||||
|
||||
from streamrip.downloadable import Downloadable
|
||||
from streamrip.qobuz_client import QobuzClient
|
||||
from streamrip.track import PendingSingle, Track
|
||||
|
||||
|
||||
def test_pending_resolve(qobuz_client: QobuzClient):
|
||||
qobuz_client.config.session.downloads.folder = "./tests"
|
||||
p = PendingSingle("19512574", qobuz_client, qobuz_client.config)
|
||||
t = arun(p.resolve())
|
||||
dir = "tests/Fleetwood Mac - Rumours (1977) [FLAC] [24B-96kHz]"
|
||||
assert os.path.isdir(dir)
|
||||
assert os.path.isfile(os.path.join(dir, "cover.jpg"))
|
||||
assert os.path.isfile(os.path.join(dir, "embed_cover.jpg"))
|
||||
assert isinstance(t, Track)
|
||||
assert isinstance(t.downloadable, Downloadable)
|
||||
assert t.cover_path is not None
|
||||
shutil.rmtree(dir)
|
||||
|
||||
|
||||
# def test_pending_resolve_mp3(qobuz_client: QobuzClient):
|
||||
# qobuz_client.config.session.qobuz.quality = 1
|
||||
# p = PendingSingle("19512574", qobuz_client, qobuz_client.config)
|
||||
# t = arun(p.resolve())
|
||||
# assert isinstance(t, Track)
|
||||
# assert False
|
Loading…
Add table
Add a link
Reference in a new issue