summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gzip.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-30 00:20:37 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-30 00:20:37 (GMT)
commit7d490650fb01788212259bdea51fe3b106879299 (patch)
tree4d35b682c3eebcfc446b69440ce103379ac2385d /Lib/test/test_gzip.py
parent7b00364e18d60a139fce25397f0d7b8667b8e5cd (diff)
downloadcpython-7d490650fb01788212259bdea51fe3b106879299.zip
cpython-7d490650fb01788212259bdea51fe3b106879299.tar.gz
cpython-7d490650fb01788212259bdea51fe3b106879299.tar.bz2
Issue #22390: Fix test_gzip if unicode filename doesn't work
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r--Lib/test/test_gzip.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index 95f5141..5025b91 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -41,11 +41,11 @@ class TestGzip(unittest.TestCase):
@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: