Skip to content

Commit

Permalink
Remove function only called in test
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Oct 30, 2024
1 parent 980b452 commit 865686f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
14 changes: 0 additions & 14 deletions src/ert/simulator/batch_simulator_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,6 @@ def results(self) -> List[Optional[Dict[str, "npt.NDArray[np.float64]"]]]:

return res

def job_status(self, iens: int) -> Optional["DeprecatedJobStatus"]:
"""Will query the queue system for the status of the job."""
state_to_legacy = {
JobState.WAITING: DeprecatedJobStatus.WAITING,
JobState.SUBMITTING: DeprecatedJobStatus.SUBMITTED,
JobState.PENDING: DeprecatedJobStatus.PENDING,
JobState.RUNNING: DeprecatedJobStatus.RUNNING,
JobState.ABORTING: DeprecatedJobStatus.DO_KILL,
JobState.COMPLETED: DeprecatedJobStatus.SUCCESS,
JobState.FAILED: DeprecatedJobStatus.FAILED,
JobState.ABORTED: DeprecatedJobStatus.IS_KILLED,
}
return state_to_legacy[self._scheduler._jobs[iens].state]

def is_job_completed(self, iens: int) -> bool:
return self.get_job_state(iens) == JobState.COMPLETED

Expand Down
8 changes: 0 additions & 8 deletions tests/ert/unit_tests/simulator/test_batch_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,6 @@ def test_batch_simulation(batch_simulator, storage):
# Asking for results before it is complete.
with pytest.raises(RuntimeError):
ctx.results()

# Ask for status of simulation we do not have.
with pytest.raises(KeyError):
ctx.job_status(1973)

with pytest.raises(KeyError):
ctx.job_progress(1987)

# Carry out simulations..
_wait_for_completion(ctx)

Expand Down

0 comments on commit 865686f

Please sign in to comment.