Skip to content

Commit

Permalink
Follow up ert log file location changes (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
berland authored Aug 30, 2022
1 parent 3be6c3c commit 9d1d87b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/test_fmuobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,9 @@ def test_ert_workflow_hook(verbose, tmp_path):
assert Path("ri-obs.csv").exists()

# Verify that we can control whether INFO messages from fmuobs through ERT
# is emitted:
ert_log_filename = "ert-log" # Beware, this filename is controlled by ERT
for file in os.listdir():
if file.startswith(ert_log_filename):
ert_log_filename = file
break
assert Path(ert_log_filename).exists()
ert_output = Path(ert_log_filename).read_text(encoding="utf8")
# is emitted.
log_file = next(Path("logs").glob("ert-log*txt"))
ert_output = log_file.read_text(encoding="utf-8")

# This is slightly tricky, as ERT has its own logging handler which is able
# to pick up the log messages, but whose level cannot be controlled by
Expand Down

0 comments on commit 9d1d87b

Please sign in to comment.