[Python-checkins] cpython (2.7): Fixed a test for issue23908 with C locale.

serhiy.storchaka python-checkins at python.org
Sun Jul 3 03:55:48 EDT 2016


https://hg.python.org/cpython/rev/b0e8a2e7c361
changeset: 102245:b0e8a2e7c361
branch: 2.7
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Jul 03 10:53:39 2016 +0300
summary:
 Fixed a test for issue23908 with C locale.
files:
 Lib/test/test_posix.py | 4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -580,6 +580,10 @@
 @test_support.requires_unicode
 def test_path_with_null_unicode(self):
 fn = test_support.TESTFN_UNICODE
+ try:
+ fn.encode(test_support.TESTFN_ENCODING)
+ except (UnicodeError, TypeError):
+ self.skipTest("Requires unicode filenames support")
 fn_with_NUL = fn + u'0円'
 self.addCleanup(test_support.unlink, fn)
 test_support.unlink(fn)
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /