From 96120d5c6d2f0542945df6ea8ed4a64e583ec5ba Mon Sep 17 00:00:00 2001 From: Zsin Skri Date: Sat, 30 Jun 2018 22:38:56 +0200 Subject: [PATCH] LastGenre test: prefer_specific without canonical This tests commit cef9a331. --- test/test_lastgenre.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_lastgenre.py b/test/test_lastgenre.py index 6c7e12261..b2d1bb51f 100644 --- a/test/test_lastgenre.py +++ b/test/test_lastgenre.py @@ -138,6 +138,21 @@ class LastGenrePluginTest(unittest.TestCase, TestHelper): self.assertEqual(self.plugin._resolve_genres(['iota blues']), u'') + def test_prefer_specific_loads_tree(self): + """When prefer_specific is enabled but canonical is not the + tree still has to be loaded. + """ + self._setup_config(prefer_specific=True, canonical=False) + self.assertNotEqual(self.plugin.c14n_branches, []) + + def test_prefer_specific_without_canonical(self): + """When prefer_specific is enabled but canonical is not the + tree still has to be loaded. + """ + self._setup_config(prefer_specific=True, canonical=False) + self.assertEqual(self.plugin._resolve_genres(['delta blues']), + u'Delta Blues') + def test_no_duplicate(self): """Remove duplicated genres. """