Skip to content

Commit

Permalink
Update error asserts and RUNPATH
Browse files Browse the repository at this point in the history
The error messages from ERT has changed, thus, the test code that assert for specific
error strings must be updated.

Also update the RUNPATH syntax to avoid use of %d formatting tokens, which
causes warnings
  • Loading branch information
berland committed Jun 16, 2023
1 parent cee8477 commit 9e17c3d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/jobs/rft/test_gendata_rft.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def test_ert_setup_one_well_one_rft_point(tmpdir):
# pylint: disable=line-too-long
Path("config.ert").write_text(
"""
RUNPATH realization-%d/iter-%d
RUNPATH realization-<IENS>/iter-<ITER>
ECLBASE 2_R001_REEK-%d
TIME_MAP time_map.txt
QUEUE_SYSTEM LOCAL
Expand Down Expand Up @@ -574,7 +574,6 @@ def test_ert_setup_one_well_one_rft_point(tmpdir):
# The purpose of the test is to demonstrate and run through the GEN_DATA
# forward model without errors, but it will fail in the update step as this
# test is not constructed for that:
assert "No active observations" in stdouterr
assert "Simulations failed" in stdouterr

# Asserts on GENDATA_RFT output:
Expand Down Expand Up @@ -643,7 +642,7 @@ def test_ert_setup_one_well_two_points_different_time_and_depth(tmpdir):
Path("config.ert").write_text(
dedent(
"""
RUNPATH realization-%d/iter-%d
RUNPATH realization-<IENS>/iter-<ITER>
ECLBASE 2_R001_REEK-%d
TIME_MAP time_map.txt
QUEUE_SYSTEM LOCAL
Expand Down Expand Up @@ -688,7 +687,7 @@ def test_ert_setup_one_well_two_points_different_time_and_depth(tmpdir):
# The purpose of the test is to demonstrate and run through the GEN_DATA
# forward model without errors, but it will fail in the update step as this
# test is not constructed for that:
assert "No active observations" in stdouterr
assert "OP_1_OBS1 is missing one or more responses" in stdouterr
assert "Simulations failed" in stdouterr

# Asserts on GENDATA_RFT output:
Expand Down

0 comments on commit 9e17c3d

Please sign in to comment.