From ed73fc99bb8f18463b57a05c0205b0d286dcee3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eide?= Date: Wed, 4 May 2022 09:07:31 +0200 Subject: [PATCH] Find ert log file The log file has the time stamp added to the file name, so we try to fint it. --- tests/jobs/csv_export2/test_integration.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/jobs/csv_export2/test_integration.py b/tests/jobs/csv_export2/test_integration.py index 211bcaf23..0ad896763 100644 --- a/tests/jobs/csv_export2/test_integration.py +++ b/tests/jobs/csv_export2/test_integration.py @@ -260,8 +260,12 @@ def test_ert_integration_errors(norne_mocked_ensembleset, snapshot): file_h.write("\n".join(ert_config)) subprocess.run(["ert", "test_run", ert_config_fname], check=True) - - with open("ert-log.txt") as fin: + log_file = "ert-log" + for file in os.listdir(): + if file.startswith(log_file): + log_file = file + break + with open(log_file) as fin: ertlog = fin.read() assert "fmu.ensemble.realization - WARNING - No STATUS file" in ertlog assert "realization-2/iter-0" in ertlog