Skip to content

Commit 1e26dc6

Browse files
committed
Remove test that is not supported on python 3.6
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
1 parent a76934c commit 1e26dc6

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

tests/test_badfiles.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# Security protection test cases
22
import ctypes
33
import os
4-
import pathlib
54
import sys
6-
from dataclasses import dataclass
7-
from tempfile import TemporaryDirectory
85

96
import pytest
107

@@ -79,28 +76,3 @@ def test_extract_symlink_attack(tmp_path):
7976
with pytest.raises(Bad7zFile):
8077
with SevenZipFile(target, "r") as archive:
8178
archive.extractall(path=target_dir)
82-
83-
84-
def test_write_compressed_archive(tmp_path):
85-
@dataclass
86-
class Contents:
87-
filename: str
88-
text: str
89-
90-
contents = (Contents(filename="bin/qmake", text="qqqqq"), Contents(filename="lib/libhoge.so", text="hoge"))
91-
with TemporaryDirectory() as temp_path, SevenZipFile(
92-
tmp_path / "tools_qtcreator-linux-qt.tools.qtcreator.7z", "w"
93-
) as archive:
94-
dest = pathlib.Path(temp_path)
95-
for folder in ("bin", "lib", "mkspecs"):
96-
(dest / folder).mkdir(parents=True, exist_ok=True)
97-
for f in contents:
98-
full_path = dest / f.filename
99-
if not full_path.parent.exists():
100-
full_path.parent.mkdir(parents=True)
101-
full_path.write_text(f.text, "utf_8")
102-
archive.writeall(path=temp_path, arcname="target")
103-
with TemporaryDirectory() as target_path, SevenZipFile(
104-
tmp_path / "tools_qtcreator-linux-qt.tools.qtcreator.7z", "r"
105-
) as archive:
106-
archive.extractall(path=target_path)

0 commit comments

Comments
 (0)