From 7d490650fb01788212259bdea51fe3b106879299 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 30 Mar 2015 02:20:37 +0200 Subject: Issue #22390: Fix test_gzip if unicode filename doesn't work --- Lib/test/test_gzip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v0.12