Skip to content

Commit a1718bc

Browse files
bpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)
1 parent 191e993 commit a1718bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_zipapp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import unittest
99
import zipapp
1010
import zipfile
11+
from test.support import requires_zlib
1112

1213
from unittest.mock import patch
1314

@@ -100,6 +101,7 @@ def test_create_archive_default_target(self):
100101
expected_target = self.tmpdir / 'source.pyz'
101102
self.assertTrue(expected_target.is_file())
102103

104+
@requires_zlib
103105
def test_create_archive_with_compression(self):
104106
# Test packing a directory into a compressed archive.
105107
source = self.tmpdir / 'source'

0 commit comments

Comments
 (0)