mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40275: More lazy imports in test.support (GH-20131)
Make the the following imports lazy in test.support: * bz2 * gzip * lzma * resource * zlib The following test.support decorators now need to be called with parenthesis: * @support.requires_bz2 * @support.requires_gzip * @support.requires_lzma * @support.requires_zlib For example, "@requires_zlib" becomes "@requires_zlib()".
This commit is contained in:
parent
ced4e5c227
commit
a3ec3ad9e2
10 changed files with 81 additions and 77 deletions
|
@ -101,7 +101,7 @@ class ZipAppTest(unittest.TestCase):
|
|||
expected_target = self.tmpdir / 'source.pyz'
|
||||
self.assertTrue(expected_target.is_file())
|
||||
|
||||
@requires_zlib
|
||||
@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