Skip to content

Commit

Permalink
Find ert log file
Browse files Browse the repository at this point in the history
The log file has the time stamp added to the file name, so we
try to fint it.
  • Loading branch information
oyvindeide committed May 4, 2022
1 parent 52dd0cf commit ed73fc9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/jobs/csv_export2/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed73fc9

Please sign in to comment.