Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adham Hashibon
force-bdss
Commits
375ec296
Commit
375ec296
authored
6 years ago
by
James Johnson
Browse files
Options
Downloads
Patches
Plain Diff
tests for additions to verifier
parent
9c1f5d84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!163
Verifier Additions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/core/tests/test_verifier.py
+29
-0
29 additions, 0 deletions
force_bdss/core/tests/test_verifier.py
with
29 additions
and
0 deletions
force_bdss/core/tests/test_verifier.py
+
29
−
0
View file @
375ec296
...
...
@@ -5,6 +5,7 @@ from force_bdss.core.input_slot_info import InputSlotInfo
from
force_bdss.core.output_slot_info
import
OutputSlotInfo
from
force_bdss.core.verifier
import
verify_workflow
from
force_bdss.core.workflow
import
Workflow
from
force_bdss.core.kpi_specification
import
KPISpecification
from
force_bdss.tests.dummy_classes.extension_plugin
import
\
DummyExtensionPlugin
...
...
@@ -47,6 +48,34 @@ class TestVerifier(unittest.TestCase):
self
.
assertEqual
(
errors
[
1
].
subject
,
wf
.
mco
.
parameters
[
0
])
self
.
assertIn
(
"
empty type
"
,
errors
[
1
].
error
)
def
test_kpis_empty_names
(
self
):
wf
=
self
.
workflow
mco_factory
=
self
.
plugin
.
mco_factories
[
0
]
wf
.
mco
=
mco_factory
.
create_model
()
kpi
=
KPISpecification
(
name
=
''
,
objective
=
'
MINIMISE
'
)
wf
.
mco
.
kpis
.
append
(
kpi
)
errors
=
verify_workflow
(
wf
)
self
.
assertEqual
(
len
(
errors
),
3
)
self
.
assertEqual
(
errors
[
1
].
subject
,
wf
.
mco
.
kpis
[
0
])
self
.
assertIn
(
"
KPI 0 has empty name
"
,
errors
[
1
].
error
)
def
test_empty_execution_layer
(
self
):
wf
=
self
.
workflow
mco_factory
=
self
.
plugin
.
mco_factories
[
0
]
wf
.
mco
=
mco_factory
.
create_model
()
parameter_factory
=
mco_factory
.
parameter_factories
()[
0
]
wf
.
mco
.
parameters
.
append
(
parameter_factory
.
create_model
())
wf
.
mco
.
parameters
[
0
].
name
=
"
name
"
wf
.
mco
.
parameters
[
0
].
type
=
"
type
"
layer
=
ExecutionLayer
()
wf
.
execution_layers
.
append
(
layer
)
errors
=
verify_workflow
(
wf
)
self
.
assertEqual
(
len
(
errors
),
1
)
self
.
assertEqual
(
errors
[
0
].
subject
,
wf
.
execution_layers
[
0
])
self
.
assertIn
(
"
Layer 0 has no data sources
"
,
errors
[
0
].
error
)
def
test_data_sources
(
self
):
wf
=
self
.
workflow
mco_factory
=
self
.
plugin
.
mco_factories
[
0
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment