test_stringutils.py: Skip test_listdir_unicode on mocked platform which cannot store non-ASCII filenames

This commit is contained in:
Francois Deppierraz 2010-05-21 09:05:59 -07:00
parent 58e9df9f5a
commit 01da7f06e6

View File

@ -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