]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-70441: Fix test_tarfile on systems w/o bz2 (gh-2962) (#94258)
authorChristian Heimes <christian@python.org>
Sat, 25 Jun 2022 10:53:37 +0000 (12:53 +0200)
committerGitHub <noreply@github.com>
Sat, 25 Jun 2022 10:53:37 +0000 (12:53 +0200)
Lib/test/test_tarfile.py

index 04f9bee66cee11e8803fe9920d1f3ac704d11902..0868d5d6e90915b56c94b47df16055cff3925d94 100644 (file)
@@ -1613,6 +1613,7 @@ class CompressLevelRaises(unittest.TestCase):
         with self.assertRaises(TypeError):
             tarfile.open(tmpname, "w:", fobj, compresslevel=compresslevel)
 
+    @support.requires_bz2()
     def test_wrong_compresslevels(self):
         # BZ2 checks that the compresslevel is in [1,9]. gz does not
         fobj = io.BytesIO()