Add test case to check getCoverArt's functionality

Mock two functions `getCoverArt`, `get_image_front` and use
a locally available cover art to check if the created cover
art exists.

Problems:
- How to check image's quality.
- Not sure if only this check is enough (do we need to check the
embedding part?).

Signed-off-by: ABCbum <kimlong221002@gmail.com>
This commit is contained in:
ABCbum
2020-01-04 01:07:25 +07:00
committed by JoeLametta
parent 8181cacca5
commit e2942b07e3
3 changed files with 57 additions and 0 deletions

View File

@@ -497,6 +497,10 @@ Log files will log the path to tracks relative to this directory.
continue
_ripIfNotRipped(i + 1)
# NOTE: Seems like some kind of with … or try: … finally: … clause
# would be more appropriate, since otherwise this would potentially
# leave stray files lying around in case of crashes etc.
# <Freso 2020-01-03, GitHub comment>
if (self.options.fetch_cover_art == "embed" and
self.coverArtPath is not None):
logger.debug('deleting cover art file at: %r', self.coverArtPath)