bpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)

This commit is contained in:
Serhiy Storchaka 2017-11-10 12:09:24 +02:00 committed by GitHub
parent 191e993365
commit a1718bc7e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View 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'