From 77e1d0925db2dc6669159fbe3fb08daf330cb5c8 Mon Sep 17 00:00:00 2001 From: wyzula-jan <133381102+wyzula-jan@users.noreply.github.com> Date: Sun, 29 Oct 2023 12:04:21 +0100 Subject: [PATCH] fix: test_bec_monitor.py QApplication instance removed --- tests/test_bec_monitor.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_bec_monitor.py b/tests/test_bec_monitor.py index 15958a74..a370f521 100644 --- a/tests/test_bec_monitor.py +++ b/tests/test_bec_monitor.py @@ -33,20 +33,20 @@ def setup_monitor(qtbot, config): # TODO fixture or helper function? return widget -@pytest.fixture(scope="module") # TODO is this needed? -def app(): - app = QApplication([]) - yield app - - -@pytest.fixture -def qtbot(app, qtbot): # TODO is this needed? - """A qtbot fixture to ensure that widgets are closed after being used.""" - qtbot.old_widgets = set(app.topLevelWidgets()) - yield qtbot - new_widgets = set(app.topLevelWidgets()) - qtbot.old_widgets - for widget in new_widgets: - widget.close() +# @pytest.fixture(scope="module") # TODO is this needed? +# def app(): +# app = QApplication([]) +# yield app +# +# +# @pytest.fixture +# def qtbot(app, qtbot): # TODO is this needed? +# """A qtbot fixture to ensure that widgets are closed after being used.""" +# qtbot.old_widgets = set(app.topLevelWidgets()) +# yield qtbot +# new_widgets = set(app.topLevelWidgets()) - qtbot.old_widgets +# for widget in new_widgets: +# widget.close() @pytest.mark.parametrize(