Skip to content

Commit

Permalink
Fix ecl_run eclipse tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Jan 14, 2024
1 parent 99af83b commit 3db8f4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ def summary_block(self):
time.sleep(1)

try:
ecl_sum = list(resfo.lazy_read(_find_unsmry(case)))
ecl_sum = [
r.read_keyword() for r in resfo.lazy_read(_find_unsmry(case))
]
except Exception:
continue

Expand Down
3 changes: 1 addition & 2 deletions tests/unit_tests/shared/share/test_ecl_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import pytest
import yaml
from resdata.summary import Summary

from tests.utils import SOURCE_DIR

Expand Down Expand Up @@ -475,7 +474,7 @@ def test_summary_block(init_ecl100_config, source_root):
assert ret_value is None

erun.runEclipse()
assert isinstance(erun.summary_block(), Summary)
assert erun.summary_block() is not None


@pytest.mark.requires_eclipse
Expand Down
4 changes: 1 addition & 3 deletions tests/unit_tests/shared/share/test_ecl_run_new_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import pytest
import yaml
from resdata.summary import Summary

from tests.utils import SOURCE_DIR

Expand Down Expand Up @@ -241,5 +240,4 @@ def test_summary_block(source_root):
assert ret_value is None

erun.runEclipse(eclrun_config=ecl_config.EclrunConfig(econfig, "2019.3"))
ecl_sum = erun.summary_block()
assert isinstance(ecl_sum, Summary)
assert erun.summary_block() is not None

0 comments on commit 3db8f4e

Please sign in to comment.