Skip to content

Commit

Permalink
Fix qa_PythonBlock failed tests.
Browse files Browse the repository at this point in the history
Signed-off-by: drslebedev <[email protected]>
  • Loading branch information
drslebedev authored and wirew0rm committed Sep 4, 2024
1 parent e20a435 commit 5a1b05d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blocks/basic/test/qa_PythonBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def process_bulk(ins, outs):
)";

PythonBlock<std::int32_t> myBlock({{"n_inputs", 3U}, {"n_outputs", 3U}, {"pythonScript", pythonScript}});
myBlock.applyChangedSettings(); // needed for unit-test only when executed outside a Scheduler/Graph
myBlock.init(myBlock.progress, myBlock.ioThreadPool); // needed for unit-test only when executed outside a Scheduler/Graph

int count = 0;
std::vector<std::int32_t> data1 = {1, 2, 3};
Expand Down Expand Up @@ -136,6 +136,7 @@ def process_bulk(ins, outs):

bool throws = false;
try {
myBlock.settings().init();
std::ignore = myBlock.settings().applyStagedParameters(); // needed for unit-test only when executed outside a Scheduler/Graph
} catch (const std::exception& ex) {
throws = true;
Expand All @@ -154,7 +155,7 @@ def process_bulk(ins, outs):
)";

PythonBlock<float> myBlock({{"n_inputs", 3U}, {"n_outputs", 3U}, {"pythonScript", pythonScript}});
myBlock.applyChangedSettings(); // needed for unit-test only when executed outside a Scheduler/Graph
myBlock.init(myBlock.progress, myBlock.ioThreadPool); // needed for unit-test only when executed outside a Scheduler/Graph

std::vector<float> data1 = {1, 2, 3};
std::vector<float> data2 = {4, 5, 6};
Expand Down

0 comments on commit 5a1b05d

Please sign in to comment.