From: Richard Kettlewell Date: Tue, 20 Nov 2007 15:38:46 +0000 (+0000) Subject: normalize recorded filenames so files.py passes X-Git-Tag: 5.0.3~421^2~20 X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/commitdiff_plain/7bbe944b70a8a904dd15905fbf351b5e906224ff?hp=121e365432c0a2f4bde67d553f545b5f42b88734 normalize recorded filenames so files.py passes --- diff --git a/tests/dtest.py b/tests/dtest.py index 3923406..dba7e35 100644 --- a/tests/dtest.py +++ b/tests/dtest.py @@ -2,7 +2,7 @@ """Utility module used by tests""" -import os,os.path,subprocess,sys,disorder +import os,os.path,subprocess,sys,disorder,unicodedata def copyfile(a,b): """copyfile(A, B) @@ -19,8 +19,10 @@ Make track with relative path S exist""" os.makedirs(trackdir) copyfile("%s/sounds/slap.ogg" % topsrcdir, trackpath) # We record the tracks we created so they can be tested against - # server responses - bits = s.split('/') + # server responses. We put them into NFC since that's what the server + # uses internally. + bits = unicodedata.normalize("NFC", + unicode(s, "UTF-8")).split('/') dp = tracks for d in bits [0:-1]: dd = "%s/%s" % (dp, d)