Skip to content

Commit 0c59270

Browse files
prandlawil93
authored andcommitted
Fix tests on python 3.11
1 parent 8d500d3 commit 0c59270

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmstestsuite/unit_tests/server/contest/submission/file_retrieval_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import base64
2121
import io
22+
import sys
2223
import tarfile
2324
import unittest
2425
import zipfile
@@ -94,6 +95,7 @@ def test_filename_with_null(self):
9495
extract_files_from_archive(archive_data.getvalue()),
9596
[ReceivedFile(None, "foo", b"some content")])
9697

98+
@unittest.skipIf(sys.version_info < (3, 12), "this archive crashes zipfile before py3.12")
9799
def test_empty_filename(self):
98100
archive_data = io.BytesIO()
99101
with zipfile.ZipFile(archive_data, "w") as f:

0 commit comments

Comments
 (0)