From: Victor Stinner Date: Sat, 14 Aug 2010 17:35:20 +0000 (+0000) Subject: Mac OS X denies unencodable filenames (invalid utf-8) X-Git-Tag: v3.2a2~318 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03c9e1dbc2066a1ef9da66b7fad52c8e8c9d742a;p=thirdparty%2FPython%2Fcpython.git Mac OS X denies unencodable filenames (invalid utf-8) --- diff --git a/Lib/test/support.py b/Lib/test/support.py index 871154aacbfd..963a2a77b7b2 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -402,7 +402,8 @@ if os.name in ('nt', 'ce'): 'Unicode filename tests may not be effective' % (TESTFN_UNENCODABLE, TESTFN_ENCODING)) TESTFN_UNENCODABLE = None -else: +elif sys.platform != 'darwin': + # Mac OS X denies unencodable filenames (invalid utf-8) try: # ascii and utf-8 cannot encode the byte 0xff b'\xff'.decode(TESTFN_ENCODING)