diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index e0e1d545b..a58437150 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -2048,11 +2049,21 @@ BOOST_AUTO_TEST_CASE(ActionX) #endif } +BOOST_AUTO_TEST_CASE(PyAction) +{ +#ifdef HAVE_MPI + Opm::Action::PyAction val1("name", Opm::Action::PyAction::RunCount::single, "import opm"); + auto val2 = PackUnpack2(val1); + DO_CHECKS(Action::PyAction) +#endif +} + + BOOST_AUTO_TEST_CASE(Actions) { #ifdef HAVE_MPI - Opm::Action::Actions val1({getActionX()}); + Opm::Action::Actions val1({getActionX()}, {{"name", Opm::Action::PyAction::RunCount::unlimited, "import numpy"}}); auto val2 = PackUnpack2(val1); DO_CHECKS(Action::Actions) #endif @@ -2130,7 +2141,7 @@ BOOST_AUTO_TEST_CASE(Schedule) 3.0, Opm::UnitSystem()}; Opm::GConSump gcm({{"test1", grp}, {"test2", grp}}); - Opm::Action::Actions acnts({getActionX()}); + Opm::Action::Actions actions({getActionX()}, {{"pyaction", Opm::Action::PyAction::RunCount::single, "import os"}}); Opm::RFTConfig rftc(getTimeMap(), std::size_t{1729}, @@ -2159,7 +2170,7 @@ BOOST_AUTO_TEST_CASE(Schedule) {{std::make_shared(gcs)}, 1}, {{std::make_shared(gcm)}, 1}, {{Opm::Well::ProducerCMode::CRAT}, 1}, - {{std::make_shared(acnts)}, 1}, + {{std::make_shared(actions)}, 1}, rftc, {std::vector{1}, 1}, getRestartConfig(),