From 1c7889b0baf8564d87f090eef32c97c2747dfdbe Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Thu, 15 Dec 2022 21:53:02 +0100 Subject: [PATCH] tests: add a (failing) test for issue #4528 --- test/test_ui.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/test_ui.py b/test/test_ui.py index ad4387013..dd393035b 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -701,6 +701,28 @@ class UpdateTest(_common.TestCase): item = self.lib.items().get() self.assertEqual(item.title, 'full') + @unittest.expectedFailure + def test_multivalued_albumtype_roundtrip(self): + # https://github.com/beetbox/beets/issues/4528 + + # albumtypes is empty for our test fixtures, so populate it first + album = self.album + # setting albumtypes does not set albumtype currently... + # FIXME: When actually fixing the issue 4528, consider whether this + # should be set to "album" or ["album"] + album.albumtype = "album" + album.albumtypes = "album" + album.try_sync(write=True, move=False) + + album.load() + albumtype_before = album.albumtype + self.assertEqual(albumtype_before, "album") + + self._update() + + album.load() + self.assertEqual(albumtype_before, album.albumtype) + class PrintTest(_common.TestCase): def setUp(self):