Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unskip gui test #6139

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/unit_tests/gui/test_gui_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
sim_panel = gui.findChild(QWidget, name="Simulation_panel")
single_run_panel = gui.findChild(QWidget, name="Single_test_run_panel")
assert (
sim_panel.getCurrentSimulationModel() == single_run_panel.getSimulationModel()

Check failure on line 39 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (86 > 79 characters)
)

sim_mode = gui.findChild(QWidget, name="Simulation_mode")
qtbot.keyClick(sim_mode, Qt.Key_Down)

ensemble_panel = gui.findChild(QWidget, name="Ensemble_experiment_panel")
assert sim_panel.getCurrentSimulationModel() == ensemble_panel.getSimulationModel()

Check failure on line 46 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (87 > 79 characters)


@pytest.mark.requires_window_manager
Expand All @@ -57,7 +57,7 @@

monkeypatch.chdir(tmp_path)

qapp.exec_ = lambda: None # exec_ starts the event loop, and will stall the test.

Check failure on line 60 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (86 > 79 characters)
monkeypatch.setattr(ert.gui.main, "QApplication", Mock(return_value=qapp))
run_gui(args)
mock_start_server.assert_called_once_with(
Expand All @@ -79,7 +79,7 @@

args = argparse.Namespace(config="poly_example/poly.ert", read_only=True)

qapp.exec_ = lambda: None # exec_ starts the event loop, and will stall the test.

Check failure on line 82 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (86 > 79 characters)
monkeypatch.setattr(ert.gui.main, "QApplication", Mock(return_value=qapp))
monkeypatch.setattr(ert.gui.main.LibresFacade, "enspath", tmp_path)
run_gui(args)
Expand All @@ -94,7 +94,7 @@
args_mock = Mock()
args_mock.config = str(config_file)

# won't run simulations so we mock it and test whether "iter_num" is in arguments

Check failure on line 97 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (85 > 79 characters)
def _assert_iter_in_args(panel):
assert panel.getSimulationArguments().iter_num == 10

Expand All @@ -109,7 +109,7 @@
)

gui = _setup_main_window(
EnKFMain(ErtConfig.from_file(str(config_file))), args_mock, GUILogHandler()

Check failure on line 112 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (83 > 79 characters)
)
qtbot.addWidget(gui)

Expand All @@ -129,7 +129,7 @@
assert sim_panel.getSimulationArguments().iter_num == 10


def test_that_gui_gives_suggestions_when_you_have_umask_in_config(qapp, tmp_path):

Check failure on line 132 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (82 > 79 characters)
config_file = tmp_path / "config.ert"
config_file.write_text("NUM_REALIZATIONS 1\n UMASK 0222\n")

Expand All @@ -140,7 +140,7 @@
assert gui.windowTitle() == "Some problems detected"


def test_that_errors_are_shown_in_the_suggester_window_when_present(qapp, tmp_path):

Check failure on line 143 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (84 > 79 characters)
config_file = tmp_path / "config.ert"
config_file.write_text("NUM_REALIZATIONS you_cant_do_this\n")

Expand Down Expand Up @@ -187,7 +187,7 @@
assert gui.windowTitle() == "ERT - poly.ert"


def test_that_the_ui_show_warnings_when_there_are_no_observations(qapp, tmp_path):

Check failure on line 190 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (82 > 79 characters)
config_file = tmp_path / "config.ert"
config_file.write_text("NUM_REALIZATIONS 1\n")

Expand Down Expand Up @@ -240,9 +240,8 @@
assert gui.windowTitle() == "ERT - poly.ert"


@pytest.mark.skip(reason="https://github.com/equinor/ert/issues/5922")
@pytest.mark.usefixtures("use_tmpdir")
def test_that_run_dialog_can_be_closed_after_used_to_open_plots(qtbot, storage):

Check failure on line 244 in tests/unit_tests/gui/test_gui_load.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (80 > 79 characters)
"""
This is a regression test for a bug where the plot window opened from run dialog
would have run dialog as parent. Because of that it would be destroyed when
Expand Down
Loading