mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 04:34:37 +03:00
Add cli tests for long_modules and modules with archives
This should cover the new lines of uncovered code in this PR.
This commit is contained in:
committed by
Hiroshi Miura
parent
dfa6733a0b
commit
24f6d9ddca
@@ -77,7 +77,7 @@ LIST_OF_FILES_AND_CONTENTS = Iterable[Dict[str, str]]
|
||||
class PatchedFile:
|
||||
filename: str
|
||||
unpatched_content: str
|
||||
patched_content: Optional[str]
|
||||
patched_content: Optional[str] = None # When None, the file is expected not to be patched.
|
||||
|
||||
def expected_content(self, **kwargs) -> str:
|
||||
if not self.patched_content:
|
||||
@@ -349,6 +349,41 @@ def tool_archive(host: str, tool_name: str, variant: str, date: datetime = datet
|
||||
r"INFO : Time elapsed: .* second"
|
||||
),
|
||||
),
|
||||
( # Mixing --modules with --archives
|
||||
"install-qt windows desktop 5.14.0 win32_mingw73 -m qtcharts --archives qtbase".split(),
|
||||
"windows",
|
||||
"desktop",
|
||||
"5.14.0",
|
||||
{"std": "win32_mingw73"},
|
||||
{"std": "mingw73_32"},
|
||||
{"std": "windows_x86/desktop/qt5_5140/Updates.xml"},
|
||||
{
|
||||
"std": [
|
||||
plain_qtbase_archive("qt.qt5.5140.win32_mingw73", "win32_mingw73"),
|
||||
MockArchive(
|
||||
filename_7z="qtcharts-windows-win32_mingw73.7z",
|
||||
update_xml_name="qt.qt5.5140.qtcharts.win32_mingw73",
|
||||
contents=(PatchedFile(filename="lib/qtcharts.h", unpatched_content="... charts ...\n"),),
|
||||
should_install=True,
|
||||
),
|
||||
MockArchive(
|
||||
filename_7z="qtlottie-windows-win32_mingw73.7z",
|
||||
update_xml_name="qt.qt5.5140.qtlottie.win32_mingw73",
|
||||
contents=(PatchedFile(filename="lib/qtlottie.h", unpatched_content="... lottie ...\n"),),
|
||||
should_install=False,
|
||||
),
|
||||
]
|
||||
},
|
||||
re.compile(
|
||||
r"^INFO : aqtinstall\(aqt\) v.* on Python 3.*\n"
|
||||
r"INFO : Downloading qtbase...\n"
|
||||
r"Finished installation of qtbase-windows-win32_mingw73.7z in .*\n"
|
||||
r"INFO : Downloading qtcharts...\n"
|
||||
r"Finished installation of qtcharts-windows-win32_mingw73.7z in .*\n"
|
||||
r"INFO : Finished installation\n"
|
||||
r"INFO : Time elapsed: .* second"
|
||||
),
|
||||
),
|
||||
(
|
||||
"install-src windows desktop 5.14.2".split(),
|
||||
"windows",
|
||||
|
||||
Reference in New Issue
Block a user