mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 05:34:47 +01:00
remove some incorrect displayable_path in library tests
These were noticed by @sampsyo in the review of
daac41668e
This commit is contained in:
parent
fff1458a9e
commit
6c969ae58c
1 changed files with 8 additions and 8 deletions
|
|
@ -358,29 +358,29 @@ class DestinationTest(_common.TestCase):
|
|||
self.i.artist = u''
|
||||
self.i.albumartist = u'something'
|
||||
self.lib.path_formats = [(u'default', u'$artist')]
|
||||
p = util.displayable_path(self.i.destination())
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], u'something')
|
||||
p = self.i.destination()
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], b'something')
|
||||
|
||||
def test_albumartist_falls_back_to_artist(self):
|
||||
self.i.artist = u'trackartist'
|
||||
self.i.albumartist = u''
|
||||
self.lib.path_formats = [(u'default', u'$albumartist')]
|
||||
p = util.displayable_path(self.i.destination())
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], u'trackartist')
|
||||
p = self.i.destination()
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], b'trackartist')
|
||||
|
||||
def test_artist_overrides_albumartist(self):
|
||||
self.i.artist = u'theartist'
|
||||
self.i.albumartist = u'something'
|
||||
self.lib.path_formats = [(u'default', u'$artist')]
|
||||
p = util.displayable_path(self.i.destination())
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], u'theartist')
|
||||
p = self.i.destination()
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], b'theartist')
|
||||
|
||||
def test_albumartist_overrides_artist(self):
|
||||
self.i.artist = u'theartist'
|
||||
self.i.albumartist = u'something'
|
||||
self.lib.path_formats = [(u'default', u'$albumartist')]
|
||||
p = util.displayable_path(self.i.destination())
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], u'something')
|
||||
p = self.i.destination()
|
||||
self.assertEqual(p.rsplit(util.PATH_SEP, 1)[1], b'something')
|
||||
|
||||
def test_unicode_normalized_nfd_on_mac(self):
|
||||
instr = unicodedata.normalize('NFC', u'caf\xe9')
|
||||
|
|
|
|||
Loading…
Reference in a new issue