[Python-checkins] cpython (2.7): Issue #22390: Fix test_gzip if unicode filename doesn't work
victor.stinner
python-checkins at python.org
Mon Mar 30 02:20:58 CEST 2015
https://hg.python.org/cpython/rev/6ef2cacec2e9
changeset: 95266:6ef2cacec2e9
branch: 2.7
parent: 95264:33e48141d83f
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Mar 30 02:20:37 2015 +0200
summary:
Issue #22390: Fix test_gzip if unicode filename doesn't work
files:
Lib/test/test_gzip.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -41,11 +41,11 @@
@test_support.requires_unicode
def test_unicode_filename(self):
unicode_filename = test_support.TESTFN_UNICODE
- self.filename = unicode_filename
try:
unicode_filename.encode(test_support.TESTFN_ENCODING)
except (UnicodeError, TypeError):
self.skipTest("Requires unicode filenames support")
+ self.filename = unicode_filename
with gzip.GzipFile(unicode_filename, "wb") as f:
f.write(data1 * 50)
with gzip.GzipFile(unicode_filename, "rb") as f:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list