Skip to content
Snippets Groups Projects
Commit b6b8a7db authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][loop_executor] Update tests for DataFormat support

parent 8ffca649
No related branches found
No related tags found
2 merge requests!281.6.x,!27Soft loop
......@@ -11,8 +11,11 @@
"type": "user/single_integer/1"
}
},
"outputs": {
"out": {
"loop": {
"input": {
"type": "user/single_integer/1"
},
"output": {
"type": "user/single_integer/1"
}
}
......
......@@ -28,6 +28,6 @@
class Algorithm:
def validate(self, result):
value = int(result)
value = result.value
return value < 6
return value < 6, {'value': 0}
......@@ -15,6 +15,14 @@
"out": {
"type": "user/single_integer/1"
}
},
"loop": {
"input": {
"type": "user/single_integer/1"
},
"output": {
"type": "user/single_integer/1"
}
}
}
]
......
......@@ -24,12 +24,13 @@
# with the BEAT platform. If not, see http://www.gnu.org/licenses/. #
# #
###############################################################################
import numpy as np
class Algorithm:
def process(self, data_loaders, outputs, loop_channel):
cnt = 100
while not loop_channel.is_result_valid(cnt):
cnt = np.uint8(100)
while not loop_channel.is_result_valid({'value': cnt}):
cnt = cnt - 1
data_loader = data_loaders.loaderOf('in')
......
......@@ -78,6 +78,16 @@ CONFIGURATION = {
'channel': 'main'
}
},
'loop': {
'input': {
'path': 'LOOP',
'channel': 'main'
},
'output': {
'path': 'LOOP',
'channel': 'main'
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment