diff --git a/src/ert/storage/local_ensemble.py b/src/ert/storage/local_ensemble.py index bc5973dc8ff..7eb8dd21b0c 100644 --- a/src/ert/storage/local_ensemble.py +++ b/src/ert/storage/local_ensemble.py @@ -287,29 +287,6 @@ def has_data(self) -> List[int]: if RealizationStorageState.RESPONSES_LOADED in ensemble_state[i] ] - def realizations_initialized(self, realizations: List[int]) -> bool: - """ - Check if specified realizations are initialized. - - Parameters - ---------- - realizations : list of int - List of realization indices. - - Returns - ------- - initialized : bool - True if all realizations are initialized. - """ - - responses = self.get_realization_mask_with_responses() - parameters = self.get_realization_mask_with_parameters() - - if len(responses) == 0 and len(parameters) == 0: - return False - - return all((responses[real] or parameters[real]) for real in realizations) - def get_realization_list_with_responses(self) -> List[int]: """ List of realization indices with associated responses. diff --git a/tests/ert/unit_tests/storage/test_local_storage.py b/tests/ert/unit_tests/storage/test_local_storage.py index ef782f8f275..75d5129929d 100644 --- a/tests/ert/unit_tests/storage/test_local_storage.py +++ b/tests/ert/unit_tests/storage/test_local_storage.py @@ -804,7 +804,12 @@ def write_error_in_save_field(self, model_ensemble: Ensemble, field_data): parameters = model_ensemble.parameter_values.values() fields = [p for p in parameters if isinstance(p, Field)] - assume(not storage_ensemble.realizations_initialized([self.iens_to_edit])) + + assume( + not storage_ensemble.get_realization_mask_with_parameters()[ + self.iens_to_edit + ] + ) for f in fields: with ( patch( @@ -824,7 +829,9 @@ def write_error_in_save_field(self, model_ensemble: Ensemble, field_data): ) assert temp_file.entered - assert not storage_ensemble.realizations_initialized([self.iens_to_edit]) + assert not storage_ensemble.get_realization_mask_with_parameters()[ + self.iens_to_edit + ] @rule( model_ensemble=ensembles,