Skip to content

Commit

Permalink
Add scheduler fixture to test_run_path_dialog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Jan 12, 2024
1 parent 66c40c5 commit e84a1f1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/unit_tests/gui/simulation/test_run_path_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pathlib import Path
from unittest.mock import Mock

import pytest
from pytestqt.qtbot import QtBot
from qtpy.QtCore import Qt, QTimer
from qtpy.QtWidgets import QComboBox, QMessageBox, QToolButton, QWidget
Expand Down Expand Up @@ -31,7 +32,10 @@ def handle_run_path_dialog(gui: ErtMainWindow, qtbot: QtBot, delete_run_path: bo
qtbot.mouseClick(mb.buttons()[0], Qt.LeftButton)


def test_run_path_is_deleted(snake_oil_case_storage: ErtConfig, qtbot: QtBot):
@pytest.mark.scheduler
def test_run_path_is_deleted(
snake_oil_case_storage: ErtConfig, qtbot: QtBot, try_queue_and_scheduler
):
snake_oil_case = snake_oil_case_storage
args_mock = Mock()
args_mock.config = "snake_oil.ert"
Expand Down Expand Up @@ -85,7 +89,10 @@ def handle_dialog():
assert not os.path.exists(run_path / dummy_file.name)


def test_run_path_is_not_deleted(snake_oil_case_storage: ErtConfig, qtbot: QtBot):
@pytest.mark.scheduler
def test_run_path_is_not_deleted(
snake_oil_case_storage: ErtConfig, qtbot: QtBot, try_queue_and_scheduler
):
snake_oil_case = snake_oil_case_storage
args_mock = Mock()
args_mock.config = "snake_oil.ert"
Expand Down

0 comments on commit e84a1f1

Please sign in to comment.