test_state2: added test_simulation.

This commit is contained in:
Steinar Foss
2019-09-13 12:06:04 +02:00
parent 97728e9fda
commit 3ecb446c20
3 changed files with 8 additions and 9 deletions

View File

@@ -93,7 +93,7 @@ void python::common::export_EclipseState(py::module& module) {
.def(py::init<const Deck&>())
.def_property_readonly( "title", &EclipseState::getTitle )
.def( "_props", &EclipseState::get3DProperties, ref_internal)
.def( "grid", &EclipseState::getInputGrid, ref_internal)
.def( "grid", &EclipseState::getInputGrid, ref_internal)
.def( "_cfg", &EclipseState::cfg, ref_internal)
.def( "_tables", &EclipseState::getTableManager, ref_internal)
.def( "has_input_nnc", &EclipseState::hasInputNNC )

View File

@@ -62,14 +62,6 @@ SATNUM
self.assertFalse('NONO' in smry) # hasKeyword
def test_simulation(self):
sim = self.state.simulation()
self.assertFalse(sim.hasThresholdPressure())
self.assertFalse(sim.useCPR())
self.assertTrue(sim.hasDISGAS())
self.assertTrue(sim.hasVAPOIL())
def test_tables(self):
tables = self.state.table
self.assertTrue('SGOF' in tables)

View File

@@ -76,5 +76,12 @@ SATNUM
self.assertEqual(g, grid.globalIndex(i,j,k))
self.assertEqual((i,j,k), grid.getIJK(g))
def test_simulation(self):
sim = self.state.simulation()
self.assertFalse(sim.hasThresholdPressure())
self.assertFalse(sim.useCPR())
self.assertTrue(sim.hasDISGAS())
self.assertTrue(sim.hasVAPOIL())