diff --git a/python/cxx/eclipse_state.cpp b/python/cxx/eclipse_state.cpp index 58fbc1ffd..44f365000 100644 --- a/python/cxx/eclipse_state.cpp +++ b/python/cxx/eclipse_state.cpp @@ -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) diff --git a/python/tests/test_state2.py b/python/tests/test_state2.py index f77d2ef84..e72400632 100644 --- a/python/tests/test_state2.py +++ b/python/tests/test_state2.py @@ -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)