From 846ee04a5f9627672a85fc59a4168a4b5bb450bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20=E2=80=9CFreso=E2=80=9D=20S=2E=20Olesen?= Date: Sat, 29 Apr 2017 13:02:18 +0200 Subject: [PATCH] Add test case illustrating https://github.com/JoeLametta/whipper/issues/127 --- whipper/test/test_common_program.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/whipper/test/test_common_program.py b/whipper/test/test_common_program.py index 170bbcc..b67e13e 100644 --- a/whipper/test/test_common_program.py +++ b/whipper/test/test_common_program.py @@ -119,3 +119,21 @@ class PathTestCase(unittest.TestCase): path = prog.getPath(u'/tmp', u'%A/%d', 'mbdiscid', 0) self.assertEquals(path, u'/tmp/Jeff Buckley/Grace') + + def testDisambiguateOnRelease(self): + """Test that disambiguation gets placed in the same part of the path as the release name. + + See https://github.com/JoeLametta/whipper/issues/127""" + prog = program.Program(config.Config()) + md = mbngs.DiscMetadata() + md.artist = 'Guy Davis' + md.sortName = 'Davis, Guy' + md.title = 'Call Down the Thunder' + md.release = '1996' + md.catalogNumber = 'RHR CD 89' + template = u'%A/%d - %y' + prog.metadata = md + + path = prog.getPath(u'/tmp', template, 'mbdiscid', 0, disambiguate=True) + self.assertEquals(path, + u'/tmp/Guy Davis/Call Down the Thunder - 1996 (RHR CD 89)')