Schedule.contains and file for Schedule tests

This commit is contained in:
Jørgen Kvalsvik
2016-12-09 15:51:29 +01:00
parent 25bd997ffd
commit f82990404f
3 changed files with 20 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
@@ -61,6 +62,7 @@ py::class_< std::vector< Well > >( "WellList", py::no_init )
py::class_< Schedule >( "Schedule", py::no_init )
.add_property( "wells", get_wells )
.def( "__contains__", &Schedule::hasWell )
;
void (ParseContext::*ctx_update)(const std::string&, InputError::Action) = &ParseContext::update;