Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
beat.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
beat
beat.core
Commits
13f3c14c
Commit
13f3c14c
authored
Nov 23, 2018
by
Samuel GAIST
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test][algorithm_loading] Add test for invalid loop definition
parent
06ac41cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.json
...test/prefix/algorithms/schema/invalid_loop_channel/1.json
+21
-0
beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.py
...e/test/prefix/algorithms/schema/invalid_loop_channel/1.py
+33
-0
beat/core/test/test_algorithm_loading.py
beat/core/test/test_algorithm_loading.py
+10
-0
No files found.
beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.json
0 → 100644
View file @
13f3c14c
{
"schema_version"
:
3
,
"language"
:
"python"
,
"api_version"
:
2
,
"type"
:
"loop"
,
"groups"
:
[
{
"inputs"
:
{
"in"
:
{
"type"
:
"user/single_integer/1"
}
},
"loop"
:
{
"answer"
:
{
"type"
:
"user/single_integer/1"
}
}
}
]
}
beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.py
0 → 100644
View file @
13f3c14c
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
###############################################################################
# #
# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/ #
# Contact: beat.support@idiap.ch #
# #
# This file is part of the beat.backend.python module of the BEAT platform. #
# #
# Commercial License Usage #
# Licensees holding valid commercial BEAT licenses may use this file in #
# accordance with the terms contained in a written agreement between you #
# and Idiap. For further information contact tto@idiap.ch #
# #
# Alternatively, this file may be used under the terms of the GNU Affero #
# Public License version 3 as published by the Free Software and appearing #
# in the file LICENSE.AGPL included in the packaging of this file. #
# The BEAT platform is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
# or FITNESS FOR A PARTICULAR PURPOSE. #
# #
# You should have received a copy of the GNU Affero Public License along #
# with the BEAT platform. If not, see http://www.gnu.org/licenses/. #
# #
###############################################################################
class
Algorithm
:
def
validate
(
self
,
result
):
value
=
result
.
value
return
value
<
6
beat/core/test/test_algorithm_loading.py
View file @
13f3c14c
...
...
@@ -67,6 +67,16 @@ def test_missing_outputs():
#----------------------------------------------------------
def
test_invalid_loop_channel
():
algorithm
=
Algorithm
(
prefix
,
'schema/invalid_loop_channel/1'
)
assert
algorithm
.
valid
is
False
assert
algorithm
.
errors
[
0
].
find
(
"'request' is a required property"
)
!=
-
1
#----------------------------------------------------------
def
test_v2
():
algorithm
=
Algorithm
(
prefix
,
'user/integers_add_v2/1'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment