Mark albumtype/s expected test failure as fixed

This commit is contained in:
Jonathan Matthews 2022-12-18 12:39:20 +00:00 committed by J0J0 Todos
parent cd52a05d3a
commit 27218a9490

View file

@ -701,27 +701,30 @@ class UpdateTest(_common.TestCase):
item = self.lib.items().get() item = self.lib.items().get()
self.assertEqual(item.title, 'full') self.assertEqual(item.title, 'full')
@unittest.expectedFailure
def test_multivalued_albumtype_roundtrip(self): def test_multivalued_albumtype_roundtrip(self):
# https://github.com/beetbox/beets/issues/4528 # https://github.com/beetbox/beets/issues/4528
# albumtypes is empty for our test fixtures, so populate it first # albumtypes is empty for our test fixtures, so populate it first
album = self.album album = self.album
# setting albumtypes does not set albumtype currently... correct_albumtypes = ["album", "live"]
# FIXME: When actually fixing the issue 4528, consider whether this
# should be set to "album" or ["album"] # Setting albumtypes does not set albumtype, currently.
album.albumtype = "album" # Using x[0] mirrors https://github.com/beetbox/mediafile/blob/057432ad53b3b84385e5582f69f44dc00d0a725d/mediafile.py#L1928
album.albumtypes = "album" correct_albumtype = correct_albumtypes[0]
album.albumtype = correct_albumtype
album.albumtypes = correct_albumtypes
album.try_sync(write=True, move=False) album.try_sync(write=True, move=False)
album.load() album.load()
albumtype_before = album.albumtype self.assertEqual(album.albumtype, correct_albumtype)
self.assertEqual(albumtype_before, "album") self.assertEqual(album.albumtypes, correct_albumtypes)
self._update() self._update()
album.load() album.load()
self.assertEqual(albumtype_before, album.albumtype) self.assertEqual(album.albumtype, correct_albumtype)
self.assertEqual(album.albumtypes, correct_albumtypes)
class PrintTest(_common.TestCase): class PrintTest(_common.TestCase):