From 390fc78a9a68b42c661275733230780d61e3b967 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Thu, 17 Jun 2010 21:51:10 -0700 Subject: [PATCH] test_cli.py: fix test failure in CLI.test_listdir_unicode_good due to filenames returned from listdir_unicode no longer being normalized. --- src/allmydata/test/test_cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py index 2e09bad8..ef6090aa 100644 --- a/src/allmydata/test/test_cli.py +++ b/src/allmydata/test/test_cli.py @@ -9,6 +9,7 @@ import simplejson from allmydata.util import fileutil, hashutil, base32 from allmydata import uri from allmydata.immutable import upload +from allmydata.dirnode import normalize # Test that the scripts can be imported -- although the actual tests of their # functionality are done by invoking them in a subprocess. @@ -429,7 +430,7 @@ class CLI(CLITestMixin, unittest.TestCase): self.failUnlessRaises(common.UnknownAliasError, ga5, u"C:\\Windows") def test_listdir_unicode_good(self): - filenames = [u'Lôzane', u'Bern', u'Genève'] + filenames = [u'Lôzane', u'Bern', u'Genève'] # must be NFC for name in filenames: self.skip_if_cannot_represent_filename(name) @@ -441,7 +442,7 @@ class CLI(CLITestMixin, unittest.TestCase): open_unicode(os.path.join(unicode(basedir), name), "wb").close() for file in listdir_unicode(unicode(basedir)): - self.failUnlessIn(file, filenames) + self.failUnlessIn(normalize(file), filenames) class Help(unittest.TestCase): -- 2.45.2