Moved PyAction class into Action:: namespace
This commit is contained in:
@@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(PYACTION) {
|
||||
SummaryState st(std::chrono::system_clock::now());
|
||||
const auto& pyaction_kw = deck.getKeyword<ParserKeywords::PYACTION>(0);
|
||||
const std::string& fname = pyaction_kw.getRecord(1).getItem(0).get<std::string>(0);
|
||||
PyAction py_action("WCLOSE", PyAction::RunCount::unlimited, PyAction::load(deck.getInputPath(), fname));
|
||||
Action::PyAction py_action("WCLOSE", Action::PyAction::RunCount::unlimited, Action::PyAction::load(deck.getInputPath(), fname));
|
||||
st.update_well_var("PROD1", "WWCT", 0);
|
||||
python.exec(py_action, ecl_state, schedule, 10, st);
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ BOOST_AUTO_TEST_CASE(ParsePYACTION) {
|
||||
const auto& record1 = keyword.getRecord(1);
|
||||
|
||||
const auto& name = record0.getItem(0).get<std::string>(0);
|
||||
auto run_count = PyAction::from_string(record0.getItem(1).get<std::string>(0));
|
||||
std::string code = PyAction::load(deck.getInputPath(), record1.getItem(0).get<std::string>(0));
|
||||
auto run_count = Action::PyAction::from_string(record0.getItem(1).get<std::string>(0));
|
||||
std::string code = Action::PyAction::load(deck.getInputPath(), record1.getItem(0).get<std::string>(0));
|
||||
|
||||
std::string literal_code =R"(from math import sin
|
||||
import random
|
||||
@@ -52,8 +52,8 @@ B = A / 10
|
||||
C = B * 20
|
||||
)";
|
||||
|
||||
PyAction pyaction("ACT1", run_count, code);
|
||||
Action::PyAction pyaction("ACT1", run_count, code);
|
||||
BOOST_CHECK_EQUAL(pyaction.name(), "ACT1");
|
||||
BOOST_CHECK_EQUAL(pyaction.code(), literal_code);
|
||||
BOOST_CHECK(pyaction.run_count() == PyAction::RunCount::single);
|
||||
BOOST_CHECK(pyaction.run_count() == Action::PyAction::RunCount::single);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user