Пример #1
0
def test_failed_realizations(initials, completed, any_failed, failures):
    brm = BaseRunModel(None, None, None)
    brm._initial_realizations_mask = initials
    brm._completed_realizations_mask = completed

    assert brm._create_mask_from_failed_realizations() == failures
    assert brm._count_successful_realizations() == sum(completed)

    assert brm.has_failed_realizations() == any_failed
Пример #2
0
def test_active_realizations(initials, expected):
    brm = BaseRunModel(None, None, None)
    brm._initial_realizations_mask = initials
    assert brm._active_realizations == expected
    assert brm._ensemble_size == len(initials)