mirror of
https://github.com/beetbox/beets.git
synced 2025-12-25 18:13:17 +01:00
modify DestinationTest.test_asciify_and_replace to include unicode
titles that decode to path separator. Added an empty .mp3 file with problematic characters for asciify_paths in id3v2 tags for future tests if needed.
This commit is contained in:
parent
fcc6c6bc80
commit
edd34267c6
2 changed files with 3 additions and 3 deletions
BIN
test/rsrc/unicode_path_sep.mp3
Normal file
BIN
test/rsrc/unicode_path_sep.mp3
Normal file
Binary file not shown.
|
|
@ -416,11 +416,11 @@ class DestinationTest(_common.TestCase):
|
|||
|
||||
def test_asciify_and_replace(self):
|
||||
config['asciify_paths'] = True
|
||||
self.lib.replacements = [(re.compile(u'"'), u'q')]
|
||||
self.lib.replacements = [(re.compile(u'"'), u'q'), (re.compile(os.path.sep), config['path_sep_replace'].get())]
|
||||
self.lib.directory = b'lib'
|
||||
self.lib.path_formats = [(u'default', u'$title')]
|
||||
self.i.title = u'\u201c\u00f6\u2014\u00cf\u201d'
|
||||
self.assertEqual(self.i.destination(), np('lib/qo--Iq'))
|
||||
self.i.title = u'\u201c\xa2\u00f6\u2014\u00cf\xbd\u201d'
|
||||
self.assertEqual(self.i.destination(), np('lib/qC_o--I1_2q'))
|
||||
|
||||
def test_destination_with_replacements(self):
|
||||
self.lib.directory = b'base'
|
||||
|
|
|
|||
Loading…
Reference in a new issue