]> granicus.if.org Git - python/commitdiff
bpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Nov 2017 10:09:24 +0000 (12:09 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Nov 2017 10:09:24 +0000 (12:09 +0200)
Lib/test/test_zipapp.py

index 3602b9989aebba3e442022e7482046a619f8bb5f..948833b2006debd450b0aaa565a978b7fb1182e9 100644 (file)
@@ -8,6 +8,7 @@ import tempfile
 import unittest
 import zipapp
 import zipfile
+from test.support import requires_zlib
 
 from unittest.mock import patch
 
@@ -100,6 +101,7 @@ class ZipAppTest(unittest.TestCase):
         expected_target = self.tmpdir / 'source.pyz'
         self.assertTrue(expected_target.is_file())
 
+    @requires_zlib
     def test_create_archive_with_compression(self):
         # Test packing a directory into a compressed archive.
         source = self.tmpdir / 'source'