From 4468068dea2709c34098e285a62e63d5634936b3 Mon Sep 17 00:00:00 2001 From: DanSava Date: Tue, 8 Oct 2024 15:44:26 +0300 Subject: [PATCH] Fix gui tests 2 --- src/ert/config/gen_data_config.py | 10 +++++----- tests/ert/ui_tests/gui/test_load_results_manually.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ert/config/gen_data_config.py b/src/ert/config/gen_data_config.py index 9c9e4093fd1..a24315a4c5e 100644 --- a/src/ert/config/gen_data_config.py +++ b/src/ert/config/gen_data_config.py @@ -108,11 +108,11 @@ def from_config_dict(cls, config_dict: ConfigDict) -> Optional[Self]: ) def read_from_file(self, run_path: str, _: int) -> polars.DataFrame: - def _read_file(filename: Path, report_step: int) -> polars.DataFrame: - if not filename.exists(): - raise ValueError(f"Missing output file: {filename}") - data = np.loadtxt(_run_path / filename, ndmin=1) - active_information_file = _run_path / (str(filename) + "_active") + def _read_file(file_path: Path, report_step: int) -> polars.DataFrame: + if not file_path.exists(): + raise ValueError(f"Missing output file: {file_path}") + data = np.loadtxt(file_path, ndmin=1) + active_information_file = _run_path / (file_path.name + "_active") if active_information_file.exists(): active_list = np.loadtxt(active_information_file) data[active_list == 0] = np.nan diff --git a/tests/ert/ui_tests/gui/test_load_results_manually.py b/tests/ert/ui_tests/gui/test_load_results_manually.py index 2b1f5f5b759..c39f4059e8c 100644 --- a/tests/ert/ui_tests/gui/test_load_results_manually.py +++ b/tests/ert/ui_tests/gui/test_load_results_manually.py @@ -24,7 +24,7 @@ def handle_load_results_dialog(): ensemble_selector.setCurrentIndex(index) load_button = get_child(panel.parent(), QPushButton, name="Load") - + run_path_edit = get_child(panel, QTextEdit, name="run_path_edit_lrm") assert run_path_edit.isEnabled()