diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-13 13:02:04 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-13 13:02:04 (GMT) |
commit | 3d85a6fa043ddab8b289ccf5fb507242d45d2c28 (patch) | |
tree | b45dcd68116766b5b526400db854474dcb2e09fa /Lib/test/test_unicode_file.py | |
parent | 994addc414cfac472e62d813067b486298bec0be (diff) | |
download | cpython-3d85a6fa043ddab8b289ccf5fb507242d45d2c28.zip cpython-3d85a6fa043ddab8b289ccf5fb507242d45d2c28.tar.gz cpython-3d85a6fa043ddab8b289ccf5fb507242d45d2c28.tar.bz2 |
Set TESTFN_UNENCODEABLE on non-Windows OSes
* Use 0xff byte on non-Windows OSes
* mbcs is now really strict by default: i closed the issue #850997, so use the
filesystem encoding and not Latin-1
* Rename TESTFN_UNICODE_UNENCODEABLE to TESTFN_UNENCODEABLE
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r-- | Lib/test/test_unicode_file.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py index 0ff1f71..7c2a1b4 100644 --- a/Lib/test/test_unicode_file.py +++ b/Lib/test/test_unicode_file.py @@ -5,8 +5,9 @@ import os, glob, time, shutil import unicodedata import unittest -from test.support import run_unittest, TESTFN_UNICODE, rmtree -from test.support import TESTFN_ENCODING, TESTFN_UNICODE_UNENCODEABLE +from test.support import (run_unittest, rmtree, + TESTFN_ENCODING, TESTFN_UNICODE, TESTFN_UNENCODEABLE) + try: TESTFN_UNICODE.encode(TESTFN_ENCODING) except (UnicodeError, TypeError): @@ -146,8 +147,8 @@ class TestUnicodeFiles(unittest.TestCase): # _test functions with each of the filename combinations we wish to test def test_single_files(self): self._test_single(TESTFN_UNICODE) - if TESTFN_UNICODE_UNENCODEABLE is not None: - self._test_single(TESTFN_UNICODE_UNENCODEABLE) + if TESTFN_UNENCODEABLE is not None: + self._test_single(TESTFN_UNENCODEABLE) def test_directories(self): # For all 'equivalent' combinations: @@ -156,9 +157,9 @@ class TestUnicodeFiles(unittest.TestCase): ext = ".dir" self._do_directory(TESTFN_UNICODE+ext, TESTFN_UNICODE+ext, False) # Our directory name that can't use a non-unicode name. - if TESTFN_UNICODE_UNENCODEABLE is not None: - self._do_directory(TESTFN_UNICODE_UNENCODEABLE+ext, - TESTFN_UNICODE_UNENCODEABLE+ext, + if TESTFN_UNENCODEABLE is not None: + self._do_directory(TESTFN_UNENCODEABLE+ext, + TESTFN_UNENCODEABLE+ext, False) def test_main(): |