Skip to content

Commit 3005be6

Browse files
Only run the test once.
1 parent c308042 commit 3005be6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/test/test_tarfile.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -930,11 +930,6 @@ def test_read_through(self):
930930
if not buf:
931931
break
932932

933-
@unittest.skipIf(zlib is None, "requires zlib")
934-
def test_read_with_extra_header(self):
935-
with tarfile.open(tgzname_with_comment_extra_data_in_header,
936-
mode="r|*") as _:
937-
pass
938933
def test_fileobj_regular_file(self):
939934
tarinfo = self.tar.next() # get "regtype" (can't use getmember)
940935
with self.tar.extractfile(tarinfo) as fobj:
@@ -977,7 +972,12 @@ def test_compare_members(self):
977972
tar1.close()
978973

979974
class GzipStreamReadTest(GzipTest, StreamReadTest):
980-
pass
975+
976+
@unittest.skipIf(zlib is None, "requires zlib")
977+
def test_read_with_extra_header(self):
978+
with tarfile.open(tgzname_with_comment_extra_data_in_header,
979+
mode="r|*") as _:
980+
pass
981981

982982
class Bz2StreamReadTest(Bz2Test, StreamReadTest):
983983
pass

0 commit comments

Comments
 (0)