From 7bbe944b70a8a904dd15905fbf351b5e906224ff Mon Sep 17 00:00:00 2001 Message-Id: <7bbe944b70a8a904dd15905fbf351b5e906224ff.1715551117.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 20 Nov 2007 15:38:46 +0000 Subject: [PATCH] normalize recorded filenames so files.py passes Organization: Straylight/Edgeware From: Richard Kettlewell --- tests/dtest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- [mdw]