mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
bpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)
This commit is contained in:
parent
191e993365
commit
a1718bc7e0
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
import unittest
|
||||
import zipapp
|
||||
import zipfile
|
||||
from test.support import requires_zlib
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
|
|
@ -100,6 +101,7 @@ def test_create_archive_default_target(self):
|
|||
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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue