Merge pull request #1398 from joakim-hove/py-refactor
Use 'PYEND' instead of '<<<' to terminate PYACTION and PYINPUT
This commit is contained in:
commit
8cb1d62f29
@ -1 +1 @@
|
||||
{"name" : "PYACTION", "sections" : ["SCHEDULE"], "code" : {"end" : "<<<"}}
|
||||
{"name" : "PYACTION", "sections" : ["SCHEDULE"], "code" : {"end" : "PYEND"}}
|
||||
|
@ -1,3 +1,3 @@
|
||||
{"name" : "PYINPUT",
|
||||
"sections" : ["RUNSPEC", "GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE"],
|
||||
"code" : {"end" : "<<<"}}
|
||||
"code" : {"end" : "PYEND"}}
|
||||
|
@ -68,17 +68,17 @@ BOOST_AUTO_TEST_CASE(PYINPUT_BASIC) {
|
||||
PYINPUT
|
||||
kw = context.DeckKeyword( context.parser['FIELD'] )
|
||||
context.deck.add(kw)
|
||||
<<<
|
||||
PYEND
|
||||
DIMENS
|
||||
2 2 1 /
|
||||
PYINPUT
|
||||
import numpy as np
|
||||
dx = np.array([0.25, 0.25, 0.25, 0.25])
|
||||
active_unit_system = context.deck.active_unit_system()
|
||||
default_unit_system = context.deck.default_unit_system()
|
||||
default_unit_system = context.deck.default_unit_system()
|
||||
kw = context.DeckKeyword( context.parser['DX'], dx, active_unit_system, default_unit_system )
|
||||
context.deck.add(kw)
|
||||
<<<
|
||||
PYEND
|
||||
DY
|
||||
4*0.25 /
|
||||
)";
|
||||
|
@ -44,7 +44,7 @@ C = B * 20
|
||||
SCHEDULE
|
||||
|
||||
PYACTION Her comes an ignored comment
|
||||
)" + input_code + "<<<";
|
||||
)" + input_code + "PYEND";
|
||||
|
||||
const std::string deck_string2 = R"(
|
||||
SCHEDULE
|
||||
@ -57,7 +57,7 @@ PYACTION
|
||||
SCHEDULE
|
||||
|
||||
PYACTION -- Comment
|
||||
)" + input_code + "<<<" + "\nGRID";
|
||||
)" + input_code + "PYEND" + "\nGRID";
|
||||
|
||||
|
||||
Parser parser;
|
||||
|
Loading…
Reference in New Issue
Block a user