From 7ddd69b0237bb102c7e1acbd4f118621b4520c0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 09:48:39 +0000 Subject: [PATCH 1/2] Build(deps-dev): Bump pytest from 8.3.5 to 9.0.3 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.5 to 9.0.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.5...9.0.3) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6551e72a..9a50f986 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ tests = [ "requests==2.34.2", "PySide6==6.11.1", "ansys-tools-common==0.5.0", - "pytest==8.3.5", + "pytest==9.0.3", "pytest-cov==7.1.0", "pytest-qt==4.5.0", "setuptools==82.0.1", From cc3e26ffe8ab288a4632975ac2a6084ac49a5193 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 10:07:36 +0000 Subject: [PATCH 2/2] test: clean up Qt widget lifecycle in gui tests --- tests/test_gui.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/test_gui.py b/tests/test_gui.py index ac83e60e..fe48b8ed 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -22,23 +22,18 @@ from PySide6 import QtWidgets import pytest -from pytestqt.qtbot import QtBot from ansys.tools.installer.main import AnsysPythonInstaller -@pytest.fixture(scope="session") -def qtbot_session(qapp, request): - result = QtBot(qapp) - yield result - - -@pytest.fixture(scope="session") -def gui(qtbot_session): +@pytest.fixture +def gui(qtbot): installer = AnsysPythonInstaller(show=False) + qtbot.addWidget(installer) yield installer - # qtbot_session.wait(1000) - # installer.close() + installer.close() + installer.deleteLater() + qtbot.wait(1) def test_main_window_header(gui):