mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +03:00
Improve warning messages re: unknown aqt arguments
This improves the warnings about unknown versions, modules, and architectures of Qt, so that it is more explicit what the message actually means. This changes the purpose of `Cli._check_modules_arg` from checking if modules exist in combinations.json, to returning a list of modules that do not exist in that file. The function has been renamed as well. This change was necessary to make the warning message more informative.
This commit is contained in:
@@ -53,13 +53,20 @@ def test_cli_help(capsys):
|
||||
assert expected_help(out)
|
||||
|
||||
|
||||
def test_cli_check_module():
|
||||
@pytest.mark.parametrize(
|
||||
"qt_version, modules, unexpected_modules",
|
||||
(
|
||||
("5.11.3", ["qtcharts", "qtwebengine"], []),
|
||||
("5.11.3", ["not_exist"], ["not_exist"]),
|
||||
("5.11.3", ["qtcharts", "qtwebengine", "not_exist"], ["not_exist"]),
|
||||
("5.11.3", None, []),
|
||||
("5.15.0", ["Unknown"], ["Unknown"]),
|
||||
),
|
||||
)
|
||||
def test_cli_select_unexpected_modules(qt_version: str, modules: Optional[List[str]], unexpected_modules: List[str]):
|
||||
cli = Cli()
|
||||
cli._setup_settings()
|
||||
assert cli._check_modules_arg("5.11.3", ["qtcharts", "qtwebengine"])
|
||||
assert not cli._check_modules_arg("5.7", ["not_exist"])
|
||||
assert cli._check_modules_arg("5.14.0", None)
|
||||
assert not cli._check_modules_arg("5.15.0", ["Unknown"])
|
||||
assert cli._select_unexpected_modules(qt_version, modules) == unexpected_modules
|
||||
|
||||
|
||||
def test_cli_check_combination():
|
||||
|
||||
Reference in New Issue
Block a user