test EmbeddedPython: added test for add keyword to deck.

This commit is contained in:
Steinar Foss
2019-10-25 17:15:56 +02:00
parent 576ddd4987
commit 0e1e9b7ac7

View File

@@ -49,8 +49,11 @@ BOOST_AUTO_TEST_CASE(INSTANTIATE) {
std::string python_code = R"(
print('Parser: {}'.format(context.parser))
print('Deck: {}'.format(context.deck))
kw = context.DeckKeyword( context.parser['FIELD'] )
context.deck.add(kw)
)";
BOOST_CHECK_NO_THROW( python.exec(python_code, parser, deck));
BOOST_CHECK( deck.hasKeyword("FIELD") );
}
#endif