File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 11
11
from asyncio import coroutine
12
12
from io import BytesIO
13
13
from pathlib import Path
14
- from test .utils import (
15
- CURL_7_20_0_URL ,
16
- GLIB_PKG_URL ,
17
- TAR_ZST_URL ,
18
- TMUX_DEB ,
19
- download_file ,
20
- )
14
+ from test .utils import CURL_7_20_0_URL , TAR_ZST_URL , TMUX_DEB , download_file
21
15
from typing import Dict , List
22
16
from zipfile import ZipFile , ZipInfo
23
17
36
30
DOVECOT_FILE_PATH = (
37
31
TEST_DIR_PATH / "condensed-downloads" / "dovecot-2.3.14-1.fc34.i686.rpm"
38
32
)
33
+ PKG_FILE_PATH = TEST_DIR_PATH / "assets" / "test.pkg"
39
34
CAB_TEST_FILE_PATH = TEST_DIR_PATH / "assets" / "cab-test-python3.8.cab"
40
35
41
36
@@ -177,7 +172,7 @@ class TestExtractFilePkg(TestExtractorBase):
177
172
178
173
def setup_method (self ):
179
174
assert inpath ("tar" ) or inpath ("7z" ), "Required tools 'tar' or '7z' not found"
180
- download_file ( GLIB_PKG_URL , self .tempdir / "test.pkg" )
175
+ shutil . copyfile ( PKG_FILE_PATH , self .tempdir / "test.pkg" )
181
176
182
177
@pytest .fixture
183
178
def extension_list (self ) -> List [str ]:
@@ -211,7 +206,7 @@ async def test_extract_file_pkg(
211
206
async for extracted_path in self .extract_files (
212
207
[f"test{ extension } " for extension in extension_list ]
213
208
):
214
- assert (Path (extracted_path ) / "usr " / "local " / "bin" / "gio " ).is_file ()
209
+ assert (Path (extracted_path ) / "dir " / "dir2 " / "file " ).is_file ()
215
210
216
211
217
212
class TestExtractFileRpmWithZstd (TestExtractorBase ):
Original file line number Diff line number Diff line change 22
22
TMUX_DEB = "https://mirrors.cat.pdx.edu/ubuntu/pool/main/t/tmux/" + TMUX_DEB_NAME
23
23
TAR_ZST_NAME = "tar-1.34-1-x86_64.pkg.tar.zst"
24
24
TAR_ZST_URL = "https://ftp5.gwdg.de/pub/linux/archlinux/core/os/x86_64/" + TAR_ZST_NAME
25
- GLIB_PKG_NAME = "glib-2.70.4_3,2.pkg"
26
- GLIB_PKG_URL = (
27
- "https://pkg.freebsd.org/FreeBSD:12:aarch64/quarterly/All/" + GLIB_PKG_NAME
28
- )
29
25
30
26
31
27
class TempDirTest :
You can’t perform that action at this time.
0 commit comments