(Merge 3.2) Issue #16218, #16414, #16444: Backport FS_NONASCII,

TESTFN_UNDECODABLE, TESTFN_NONASCII of test.support from Python 3.4. Backport
tests on non-ASCII paths.
This commit is contained in:
Victor Stinner 2013-01-03 01:56:38 +01:00
commit 269b3ce400
3 changed files with 18 additions and 15 deletions

View file

@ -367,11 +367,10 @@ class CmdLineTest(unittest.TestCase):
# Mac OS X denies the creation of a file with an invalid UTF-8 name.
# Windows allows to create a name with an arbitrary bytes name, but
# Python cannot a undecodable bytes argument to a subprocess.
#if (support.TESTFN_UNDECODABLE
#and sys.platform not in ('win32', 'darwin')):
# name = os.fsdecode(support.TESTFN_UNDECODABLE)
#elif support.TESTFN_NONASCII:
if support.TESTFN_NONASCII:
if (support.TESTFN_UNDECODABLE
and sys.platform not in ('win32', 'darwin')):
name = os.fsdecode(support.TESTFN_UNDECODABLE)
elif support.TESTFN_NONASCII:
name = support.TESTFN_NONASCII
else:
self.skipTest("need support.TESTFN_NONASCII")