test_state2: added test_config.
This commit is contained in:
@@ -94,7 +94,7 @@ void python::common::export_EclipseState(py::module& module) {
|
||||
.def_property_readonly( "title", &EclipseState::getTitle )
|
||||
.def( "props", &EclipseState::get3DProperties, ref_internal)
|
||||
.def( "grid", &EclipseState::getInputGrid, ref_internal)
|
||||
.def( "_cfg", &EclipseState::cfg, ref_internal)
|
||||
.def( "config", &EclipseState::cfg, ref_internal)
|
||||
.def( "tables", &EclipseState::getTableManager, ref_internal)
|
||||
.def( "has_input_nnc", &EclipseState::hasInputNNC )
|
||||
.def( "simulation", &EclipseState::getSimulationConfig, ref_internal)
|
||||
|
||||
@@ -59,6 +59,18 @@ SATNUM
|
||||
cls.state = EclipseState(cls.deck_spe3)
|
||||
cls.cp_state = EclipseState(cls.deck_cpa)
|
||||
|
||||
def test_config(self):
|
||||
cfg = self.state.config()
|
||||
|
||||
init = cfg.init()
|
||||
self.assertTrue(init.hasEquil())
|
||||
self.assertFalse(init.restartRequested())
|
||||
self.assertEqual(0, init.getRestartStep())
|
||||
|
||||
rst = cfg.restart()
|
||||
self.assertFalse(rst.getWriteRestartFile(0))
|
||||
self.assertEqual(7, rst.getFirstRestartStep())
|
||||
|
||||
def test_repr_title(self):
|
||||
self.assertEqual('SPE 3 - CASE 1', self.state.title)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user