Skip to content

Commit

Permalink
Filter non ConfigWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
frode-aarstad committed Sep 18, 2023
1 parent 6e7d720 commit 2cf6c87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit_tests/config/test_ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,7 @@ def run(self, *args):
@pytest.mark.usefixtures("use_tmpdir")
def test_validate_job_args_no_warning(caplog, recwarn):
caplog.set_level(logging.WARNING)

with open("job_file", "w", encoding="utf-8") as fout:
fout.write("EXECUTABLE echo\nARGLIST <ECLBASE> <RUNPATH>\n")

Expand All @@ -1474,7 +1475,9 @@ def test_validate_job_args_no_warning(caplog, recwarn):
)

ErtConfig.from_file("config_file.ert")

# Check no warning is logged when config contains
# forward model with <ECLBASE> and <RUNPATH> as arguments
assert caplog.text == ""
assert len(recwarn) == 0
for w in recwarn:
assert not issubclass(w.category, ConfigWarning)

0 comments on commit 2cf6c87

Please sign in to comment.