Add python wrapper for Schedule::wellNames( const std::string& )
This commit is contained in:
parent
29a946eb9a
commit
ab821b90a5
@ -103,6 +103,7 @@ void python::common::export_Schedule(py::module& module) {
|
||||
.def( "open_well", &Schedule::open_well)
|
||||
.def( "stop_well", &Schedule::stop_well)
|
||||
.def( "get_wells", &Schedule::getWells)
|
||||
.def("well_names", py::overload_cast<const std::string&>(&Schedule::wellNames, py::const_))
|
||||
.def( "get_well", &get_well)
|
||||
.def( "__contains__", &has_well )
|
||||
.def( "group", &Schedule::getGroup, ref_internal);
|
||||
|
@ -75,5 +75,15 @@ class TestSchedule(unittest.TestCase):
|
||||
rst = sch.restart
|
||||
|
||||
|
||||
def test_well_names(self):
|
||||
deck = Parser().parse(test_path('spe3/SPE3CASE1.DATA'))
|
||||
state = EclipseState(deck)
|
||||
sch = Schedule( deck, state )
|
||||
wnames = sch.well_names("*")
|
||||
self.assertTrue("PROD" in wnames)
|
||||
self.assertTrue("INJ" in wnames)
|
||||
self.assertEqual(len(wnames), 2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user