Skip to content

Commit

Permalink
Fix RealizationState vs RealizationStorageState imports and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Nov 24, 2023
1 parent 26d1f94 commit 29f09f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/unit_tests/simulator/test_batch_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

from ert.config import ErtConfig
from ert.realization_state import RealizationState
from ert.job_queue import RealizationState
from ert.simulator import BatchSimulator


Expand Down
7 changes: 4 additions & 3 deletions tests/unit_tests/simulator/test_simulation_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from ert.enkf_main import EnKFMain
from ert.realization_state import RealizationState
from ert.job_queue import RealizationState
from ert.simulator import SimulationContext
from ert.storage import RealizationStorageState
from tests.utils import wait_until


Expand Down Expand Up @@ -64,10 +65,10 @@ def test_simulation_context(setup_case, storage):
assert not even_ctx.didRealizationFail(iens)
assert even_ctx.isRealizationFinished(iens)

assert even_half.state_map[iens] == RealizationState.HAS_DATA
assert even_half.state_map[iens] == RealizationStorageState.HAS_DATA
else:
assert odd_ctx.didRealizationSucceed(iens)
assert not odd_ctx.didRealizationFail(iens)
assert odd_ctx.isRealizationFinished(iens)

assert odd_half.state_map[iens] == RealizationState.HAS_DATA
assert odd_half.state_map[iens] == RealizationStorageState.HAS_DATA

0 comments on commit 29f09f4

Please sign in to comment.