From 3b6ead247500529533b2b21e943802196961b65c Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 25 Jun 2022 11:54:27 +0200 Subject: [PATCH] gh-70441: Fix test_tarfile on systems w/o bz2 (gh-2962) --- Lib/test/test_tarfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 04f9bee66cee11..0868d5d6e90915 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -1613,6 +1613,7 @@ def test_compresslevel_wrong_modes(self): 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()