summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gzip.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-10-13 07:33:32 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-10-13 07:33:32 (GMT)
commitfbddffad2f860b46dba1ab44fe5a5dddbd294f37 (patch)
tree2de023565a09cb640d1e8a385f62775975875341 /Lib/test/test_gzip.py
parent08da46e10f3fb49ecb2d69bc934667e5a352b2a7 (diff)
downloadcpython-fbddffad2f860b46dba1ab44fe5a5dddbd294f37.zip
cpython-fbddffad2f860b46dba1ab44fe5a5dddbd294f37.tar.gz
cpython-fbddffad2f860b46dba1ab44fe5a5dddbd294f37.tar.bz2
Fixed the test of issue #13664 on platforms without unicode filenames support.
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r--Lib/test/test_gzip.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index 9713061..7f24981 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -33,6 +33,10 @@ class TestGzip(unittest.TestCase):
@test_support.requires_unicode
def test_unicode_filename(self):
unicode_filename = test_support.TESTFN_UNICODE
+ try:
+ unicode_filename.encode(test_support.TESTFN_ENCODING)
+ except (UnicodeError, TypeError):
+ self.skipTest("Requires unicode filenames support")
with gzip.GzipFile(unicode_filename, "wb") as f:
f.write(data1 * 50)
with gzip.GzipFile(unicode_filename, "rb") as f: