mirror of
https://github.com/beetbox/beets.git
synced 2026-02-22 07:14:24 +01:00
test_art: add unit test
the test checks that the keyword priority (related to its position in the keywords list) is considered when selecting image filename amongst several candidates
This commit is contained in:
parent
16f6a3daa7
commit
ef89daf1be
1 changed files with 6 additions and 0 deletions
|
|
@ -78,6 +78,12 @@ class FSArtTest(_common.TestCase):
|
|||
fn = fetchart.art_in_path(self.dpath, ('art',), True)
|
||||
self.assertEqual(fn, None)
|
||||
|
||||
def test_precedence_amongst_correct_files(self):
|
||||
_common.touch(os.path.join(self.dpath, 'back.jpg'))
|
||||
_common.touch(os.path.join(self.dpath, 'front.jpg'))
|
||||
_common.touch(os.path.join(self.dpath, 'front-cover.jpg'))
|
||||
fn = fetchart.art_in_path(self.dpath, ('cover', 'front', 'back'), False)
|
||||
self.assertEqual(fn, os.path.join(self.dpath, 'front-cover.jpg'))
|
||||
|
||||
class CombinedTest(_common.TestCase):
|
||||
ASIN = 'xxxx'
|
||||
|
|
|
|||
Loading…
Reference in a new issue