mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 13:14:37 +03:00
Fix syntax of new subcommands in tests
This commit is contained in:
@@ -87,8 +87,8 @@ def test_cli_invalid_version(capsys, invalid_version):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for cmd in (
|
for cmd in (
|
||||||
("install-qt", invalid_version, "mac", "desktop"),
|
("install-qt", "mac", "desktop", invalid_version),
|
||||||
("install-doc", invalid_version, "mac", "desktop"),
|
("install-doc", "mac", "desktop", invalid_version),
|
||||||
("list-qt", "mac", "desktop", "--modules", invalid_version),
|
("list-qt", "mac", "desktop", "--modules", invalid_version),
|
||||||
):
|
):
|
||||||
with pytest.raises(SystemExit) as pytest_wrapped_e:
|
with pytest.raises(SystemExit) as pytest_wrapped_e:
|
||||||
@@ -106,7 +106,7 @@ def test_cli_check_mirror():
|
|||||||
cli = Cli()
|
cli = Cli()
|
||||||
cli._setup_settings()
|
cli._setup_settings()
|
||||||
assert cli._check_mirror(None)
|
assert cli._check_mirror(None)
|
||||||
arg = ["install", "5.11.3", "linux", "desktop", "-b", "https://download.qt.io/"]
|
arg = ["install-qt", "linux", "desktop", "5.11.3", "-b", "https://download.qt.io/"]
|
||||||
args = cli.parser.parse_args(arg)
|
args = cli.parser.parse_args(arg)
|
||||||
assert args.base == "https://download.qt.io/"
|
assert args.base == "https://download.qt.io/"
|
||||||
assert cli._check_mirror(args.base)
|
assert cli._check_mirror(args.base)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ def test_cli_unknown_version(capsys):
|
|||||||
wrong_url_ending = "mac_x64/desktop/qt5_5160/Updates.xml"
|
wrong_url_ending = "mac_x64/desktop/qt5_5160/Updates.xml"
|
||||||
with pytest.raises(SystemExit) as pytest_wrapped_e:
|
with pytest.raises(SystemExit) as pytest_wrapped_e:
|
||||||
cli = aqt.installer.Cli()
|
cli = aqt.installer.Cli()
|
||||||
cli.run(["install", wrong_version, "mac", "desktop"])
|
cli.run(["install-qt", "mac", "desktop", wrong_version])
|
||||||
assert pytest_wrapped_e.type == SystemExit
|
assert pytest_wrapped_e.type == SystemExit
|
||||||
assert pytest_wrapped_e.value.code == 1
|
assert pytest_wrapped_e.value.code == 1
|
||||||
out, err = capsys.readouterr()
|
out, err = capsys.readouterr()
|
||||||
|
|||||||
Reference in New Issue
Block a user