From 01da7f06e65578f5237c5d461c80b45d165e7a57 Mon Sep 17 00:00:00 2001 From: Francois Deppierraz Date: Fri, 21 May 2010 09:05:59 -0700 Subject: [PATCH] test_stringutils.py: Skip test_listdir_unicode on mocked platform which cannot store non-ASCII filenames --- src/allmydata/test/test_stringutils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/allmydata/test/test_stringutils.py b/src/allmydata/test/test_stringutils.py index 38841c17..77013de6 100644 --- a/src/allmydata/test/test_stringutils.py +++ b/src/allmydata/test/test_stringutils.py @@ -176,6 +176,8 @@ class StringUtils: @patch('sys.getfilesystemencoding') @patch('os.listdir') def test_listdir_unicode(self, mock_listdir, mock_getfilesystemencoding): + if 'dirlist' not in dir(self): + raise unittest.SkipTest("No way to write non-ASCII filenames on this system") mock_listdir.return_value = self.dirlist mock_getfilesystemencoding.return_value = self.filesystemencoding -- 2.45.2