[Python-checkins] gh-70441: Fix test_tarfile on systems w/o bz2 (gh-2962) (#94258)

tiran webhook-mailer at python.org
Sat Jun 25 06:53:48 EDT 2022


https://github.com/python/cpython/commit/b52849905218582d067a875712af8c2bcc8789c4
commit: b52849905218582d067a875712af8c2bcc8789c4
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2022-06-25T12:53:37+02:00
summary:

gh-70441: Fix test_tarfile on systems w/o bz2 (gh-2962) (#94258)

files:
M Lib/test/test_tarfile.py

diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 04f9bee66cee1..0868d5d6e9091 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()



More information about the Python-checkins mailing list