From 0790ad321ec1fb8b272d1c39e86033cdd0bb874f Mon Sep 17 00:00:00 2001 From: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com> Date: Thu, 9 Jan 2025 06:13:15 +0100 Subject: [PATCH] Fix test --- aqt/installer.py | 2 -- tests/test_install.py | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aqt/installer.py b/aqt/installer.py index 54036cff..30ae7f39 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -1619,8 +1619,6 @@ def install(self) -> None: self.logger.info(f"Downloading Qt installer to {installer_path}") self._download_installer(installer_path) - self.logger.info("Starting Qt installation") - try: cmd = self._get_install_command(installer_path) safe_cmd = cmd.copy() diff --git a/tests/test_install.py b/tests/test_install.py index 09d5a3da..25a29aff 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -2056,14 +2056,16 @@ def mock_get_url(url: str, *args, **kwargs) -> str: assert expect_out.match(err), err +@pytest.mark.enable_socket @pytest.mark.parametrize( "cmd, arch_dict, details, expected_command", [ ( - "install-qt-commercial desktop {} 6.8.0 " "--outputdir ./install-qt-commercial " "--user {} --password {}", + "install-qt-commercial desktop {} 6.8.0 " "--outputdir /tmp/install-qt-commercial " "--user {} --password {}", {"windows": "win64_msvc2022_64", "linux": "linux_gcc_64", "mac": "clang_64"}, - ["./install-qt-commercial", "qt6", "681"], - "qt-unified-{}-online.run --email ******** --pw ******** --root {} --accept-licenses --accept-obligations " + ["/tmp/install-qt-commercial", "qt6", "680"], + "qt-unified-{}-x64-online.run --email ******** --pw ******** --root {} " + "--accept-licenses --accept-obligations " "--confirm-command " "--auto-answer OperationDoesNotExistError=Ignore,OverwriteTargetDirectory=No," "stopProcessesForUpdates=Cancel,installationErrorWithCancel=Cancel,installationErrorWithIgnore=Ignore," @@ -2079,12 +2081,12 @@ def test_install_qt_commercial( arch = arch_dict[current_platform] formatted_cmd = cmd.format(arch, "vofab76634@gholar.com", "WxK43TdWCTmxsrrpnsWbjPfPXVq3mtLK") - formatted_expected = expected_command.format(arch, *details, arch) + formatted_expected = expected_command.format(current_platform, *details, arch) cli = Cli() cli._setup_settings() cli.run(formatted_cmd.split()) - [out, _] = capsys.readouterr() - assert str(out).find(formatted_expected) + out = " ".join(capsys.readouterr()) + assert str(out).find(formatted_expected) >= 0