@@ -1246,7 +1246,7 @@ class TestArchives(BaseTest, unittest.TestCase):
12461246
12471247 ### shutil.make_archive
12481248
1249- @support .requires_zlib
1249+ @support .requires_zlib ()
12501250 def test_make_tarball (self ):
12511251 # creating something to tar
12521252 root_dir , base_dir = self ._create_files ('' )
@@ -1302,7 +1302,7 @@ def _create_files(self, base_dir='dist'):
13021302 write_file ((root_dir , 'outer' ), 'xxx' )
13031303 return root_dir , base_dir
13041304
1305- @support .requires_zlib
1305+ @support .requires_zlib ()
13061306 @unittest .skipUnless (shutil .which ('tar' ),
13071307 'Need the tar command to run' )
13081308 def test_tarfile_vs_tar (self ):
@@ -1335,7 +1335,7 @@ def test_tarfile_vs_tar(self):
13351335 self .assertEqual (tarball , base_name + '.tar' )
13361336 self .assertTrue (os .path .isfile (tarball ))
13371337
1338- @support .requires_zlib
1338+ @support .requires_zlib ()
13391339 def test_make_zipfile (self ):
13401340 # creating something to zip
13411341 root_dir , base_dir = self ._create_files ()
@@ -1372,7 +1372,7 @@ def test_make_zipfile(self):
13721372 ['dist/' , 'dist/sub/' , 'dist/sub2/' ,
13731373 'dist/file1' , 'dist/file2' , 'dist/sub/file3' ])
13741374
1375- @support .requires_zlib
1375+ @support .requires_zlib ()
13761376 @unittest .skipUnless (shutil .which ('zip' ),
13771377 'Need the zip command to run' )
13781378 def test_zipfile_vs_zip (self ):
@@ -1398,7 +1398,7 @@ def test_zipfile_vs_zip(self):
13981398 names2 = zf .namelist ()
13991399 self .assertEqual (sorted (names ), sorted (names2 ))
14001400
1401- @support .requires_zlib
1401+ @support .requires_zlib ()
14021402 @unittest .skipUnless (shutil .which ('unzip' ),
14031403 'Need the unzip command to run' )
14041404 def test_unzip_zipfile (self ):
@@ -1427,7 +1427,7 @@ def test_make_archive(self):
14271427 base_name = os .path .join (tmpdir , 'archive' )
14281428 self .assertRaises (ValueError , make_archive , base_name , 'xxx' )
14291429
1430- @support .requires_zlib
1430+ @support .requires_zlib ()
14311431 def test_make_archive_owner_group (self ):
14321432 # testing make_archive with owner and group, with various combinations
14331433 # this works even if there's not gid/uid support
@@ -1455,7 +1455,7 @@ def test_make_archive_owner_group(self):
14551455 self .assertTrue (os .path .isfile (res ))
14561456
14571457
1458- @support .requires_zlib
1458+ @support .requires_zlib ()
14591459 @unittest .skipUnless (UID_GID_SUPPORT , "Requires grp and pwd support" )
14601460 def test_tarfile_root_owner (self ):
14611461 root_dir , base_dir = self ._create_files ()
@@ -1500,7 +1500,7 @@ def test_make_tarfile_in_curdir(self):
15001500 self .assertEqual (make_archive ('test' , 'tar' ), 'test.tar' )
15011501 self .assertTrue (os .path .isfile ('test.tar' ))
15021502
1503- @support .requires_zlib
1503+ @support .requires_zlib ()
15041504 def test_make_zipfile_in_curdir (self ):
15051505 # Issue #21280
15061506 root_dir = self .mkdtemp ()
@@ -1555,20 +1555,20 @@ def check_unpack_archive_with_converter(self, format, converter):
15551555 def test_unpack_archive_tar (self ):
15561556 self .check_unpack_archive ('tar' )
15571557
1558- @support .requires_zlib
1558+ @support .requires_zlib ()
15591559 def test_unpack_archive_gztar (self ):
15601560 self .check_unpack_archive ('gztar' )
15611561
1562- @support .requires_bz2
1562+ @support .requires_bz2 ()
15631563 def test_unpack_archive_bztar (self ):
15641564 self .check_unpack_archive ('bztar' )
15651565
1566- @support .requires_lzma
1566+ @support .requires_lzma ()
15671567 @unittest .skipIf (AIX and not _maxdataOK (), "AIX MAXDATA must be 0x20000000 or larger" )
15681568 def test_unpack_archive_xztar (self ):
15691569 self .check_unpack_archive ('xztar' )
15701570
1571- @support .requires_zlib
1571+ @support .requires_zlib ()
15721572 def test_unpack_archive_zip (self ):
15731573 self .check_unpack_archive ('zip' )
15741574
0 commit comments