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", 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):