diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-09-08 18:11:13 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-09-08 18:11:13 (GMT) |
commit | e58571b7eaa3f282d7d29f3aead1cc8220bec473 (patch) | |
tree | e43f9fd886b42d92ec4d6c544fe83e91eb6f27e8 /Lib/test/test_sys.py | |
parent | ee178e6d6ebcf28da8696c853cc9de5e3c0f15b4 (diff) | |
download | cpython-e58571b7eaa3f282d7d29f3aead1cc8220bec473.zip cpython-e58571b7eaa3f282d7d29f3aead1cc8220bec473.tar.gz cpython-e58571b7eaa3f282d7d29f3aead1cc8220bec473.tar.bz2 |
Fixes tests broken by issue #27781.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index ea152c1..6084d2d 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -10,6 +10,7 @@ import codecs import gc import sysconfig import platform +import locale # count the number of test runs, used to create unique # strings to intern in test_intern() @@ -627,6 +628,8 @@ class SysModuleTest(unittest.TestCase): @unittest.skipUnless(test.support.FS_NONASCII, 'requires OS support of non-ASCII encodings') + @unittest.skipUnless(sys.getfilesystemencoding() == locale.getpreferredencoding(False), + 'requires FS encoding to match locale') def test_ioencoding_nonascii(self): env = dict(os.environ) @@ -669,8 +672,6 @@ class SysModuleTest(unittest.TestCase): fs_encoding = sys.getfilesystemencoding() if sys.platform == 'darwin': expected = 'utf-8' - elif sys.platform == 'win32': - expected = 'mbcs' else: expected = None self.check_fsencoding(fs_encoding, expected) |